/**
 * Taskip Payment Gateway - Thank You Page Styles
 * Styles for the thank you shortcode
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.tpg-container {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 2rem auto;
}

.tpg-success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: tpg-success-pulse 2s infinite;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.tpg-success-icon::after {
    content: '✓';
    color: white;
    font-size: 45px;
    font-weight: bold;
}

@keyframes tpg-success-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
    }
}

.tpg-title {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.tpg-subtitle {
    color: #6b7280;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.tpg-progress-ring {
    margin: 2rem auto;
    width: 120px;
    height: 120px;
    position: relative;
}

.tpg-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.tpg-progress-ring circle {
    fill: none;
    stroke-width: 8;
}

.tpg-progress-ring .tpg-bg {
    stroke: #e5e7eb;
}

.tpg-progress-ring .tpg-progress {
    stroke: #3b82f6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.tpg-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.tpg-vertical-steps {
    text-align: left;
    margin: 2rem 0;
}

.tpg-v-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.tpg-v-step.tpg-completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tpg-v-step.tpg-current,
.tpg-v-step.tpg-processing {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.4);
    animation: tpg-current-pulse 2s infinite;
}

.tpg-v-step.tpg-pending {
    background: rgba(249, 250, 251, 0.5);
    border: 1px solid #e5e7eb;
}

.tpg-complete-registration {
    width: 100%;
    padding: 12px;
    background: var(--color-2);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

@keyframes tpg-current-pulse {
    0%, 100% {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    }
    50% {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
    }
}

.tpg-v-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.tpg-v-step.tpg-completed .tpg-v-step-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.tpg-v-step.tpg-current .tpg-v-step-icon,
.tpg-v-step.tpg-processing .tpg-v-step-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.tpg-v-step.tpg-pending .tpg-v-step-icon {
    background: #f3f4f6;
    color: #9ca3af;
}

.tpg-v-step-content h3 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.tpg-v-step.tpg-completed .tpg-v-step-content h3 {
    color: #059669;
}

.tpg-v-step.tpg-current .tpg-v-step-content h3,
.tpg-v-step.tpg-processing .tpg-v-step-content h3 {
    color: #d97706;
}

.tpg-v-step.tpg-pending .tpg-v-step-content h3 {
    color: #9ca3af;
}

.tpg-eta {
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tpg-container {
        padding: 2rem;
        margin: 1rem;
        border-radius: 16px;
    }

    .tpg-title {
        font-size: 1.8rem;
    }

    .tpg-subtitle {
        font-size: 1rem;
    }

    .tpg-progress-ring {
        width: 100px;
        height: 100px;
    }

    .tpg-progress-text {
        font-size: 1.2rem;
    }

    .tpg-v-step {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .tpg-v-step-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .tpg-v-step-content h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tpg-container {
        padding: 1.5rem;
    }

    .tpg-title {
        font-size: 1.5rem;
    }

    .tpg-success-icon {
        width: 70px;
        height: 70px;
    }

    .tpg-success-icon::after {
        font-size: 35px;
    }

    .tpg-progress-ring {
        width: 80px;
        height: 80px;
    }

    .tpg-progress-text {
        font-size: 1rem;
    }
}

/* Spinner Animation for Processing Steps */
.tpg-spinner {
    display: inline-block;
    animation: tpg-spin 1.5s linear infinite;
}

@keyframes tpg-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Failed state styles */
.tpg-v-step.tpg-failed {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tpg-v-step.tpg-failed .tpg-v-step-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.tpg-v-step.tpg-failed .tpg-v-step-content h3 {
    color: #dc2626;
}

/* Registration Form Styles */
.tpg-registration-form {
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--color-2);
}

.tpg-registration-form h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.tpg-registration-form p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.tpg-registration-error {
    display: none;
    margin-bottom: 15px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.4;
}

.tpg-reg-form {
    max-width: 400px;
}

.tpg-field-group {
    margin-bottom: 15px;
}

.tpg-field-group:last-of-type {
    margin-bottom: 20px;
}

.tpg-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.tpg-field-group input[type="password"],
.tpg-field-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.tpg-field-group input[type="password"]:focus,
.tpg-field-group input[type="text"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.tpg-field-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.tpg-workspace-url-container {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.tpg-url-prefix,
.tpg-url-suffix {
    padding: 10px;
    background: #f6f7f7;
    color: #666;
    font-size: 14px;
}

.tpg-url-prefix {
    border-right: 1px solid #ddd;
}

.tpg-url-suffix {
    border-left: 1px solid #ddd;
}

.tpg-workspace-url-input {
    flex: 1;
    padding: 10px;
    border: none;
    font-size: 14px;
    outline: none;
}

.tpg-url-status {
    font-size: 12px;
    margin-top: 5px;
}

.tpg-complete-registration {
    width: 100%;
    padding: 12px;
    background: var(--color-2);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tpg-complete-registration:hover:not(:disabled) {
    background: var(--color-2);
    opacity: 0.8;
}

.tpg-complete-registration:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tpg-btn-spinner {
    display: none;
}

/* Retry Controls */
.tpg-retry-controls {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.tpg-retry-btn {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.tpg-retry-btn:hover {
    background: #005a8c;
}

/* Stage Error Messages */
.tpg-stage-error {
    display: none;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #dc2626;
    font-size: 12px;
}

/* Task spinner */
.taskip-btn-spinner {
    display: none;
}

/* Error styling for general errors */
.taskip-error {
    padding: 10px;
    border: 1px solid #dc3232;
    background: #f9f9f9;
    color: #dc3232;
    border-radius: 3px;
    margin: 10px 0;
}