/**
 * Promoter ID Dialog - Glassmorphism Styling
 * bijakbuatduit.com
 */

/* Keyframes Animations */
@keyframes promoter-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes promoter-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes promoter-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes promoter-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }
}

@keyframes promoter-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* SweetAlert2 Custom Styling */
.swal2-popup.promoter-dialog-popup {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    padding: 40px 35px !important;
    max-width: 420px !important;
    animation: promoter-slideUp 0.5s ease-out !important;
}

.swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* Dialog Container */
.promoter-dialog-container {
    text-align: center;
}

/* Icon Container */
.promoter-icon-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: promoter-float 3s ease-in-out infinite, promoter-pulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.promoter-icon-container svg {
    width: 50px;
    height: 50px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Title */
.promoter-dialog-title {
    font-size: 26px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Subtitle */
.promoter-dialog-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Input Group */
.promoter-input-group {
    position: relative;
    margin-bottom: 20px;
}

.promoter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.promoter-input-icon {
    position: absolute;
    left: 16px;
    color: #9CA3AF;
    z-index: 1;
    transition: color 0.3s ease;
}

.promoter-input-icon svg {
    width: 20px;
    height: 20px;
}

.promoter-input {
    width: 100%;
    padding: 16px 50px 16px 48px;
    font-size: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 14px;
    background: rgba(249, 250, 251, 0.8);
    transition: all 0.3s ease;
    outline: none;
    color: #1F2937;
    font-weight: 500;
}

.promoter-input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.promoter-input:focus {
    border-color: #10B981;
    background: white;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.promoter-input:focus + .promoter-input-icon,
.promoter-input:focus ~ .promoter-input-icon {
    color: #10B981;
}

.promoter-input.input-error {
    border-color: #EF4444;
    background: rgba(254, 242, 242, 0.8);
}

.promoter-input.input-success {
    border-color: #10B981;
    background: rgba(236, 253, 245, 0.8);
}

/* Validation Status */
.promoter-validation-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    min-height: 24px;
    transition: all 0.3s ease;
}

.promoter-validation-status.status-checking {
    color: #6B7280;
}

.promoter-validation-status.status-error {
    color: #EF4444;
}

.promoter-validation-status.status-success {
    color: #10B981;
}

/* Loading Spinner */
.promoter-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #E5E7EB;
    border-top-color: #10B981;
    border-radius: 50%;
    animation: promoter-spin 0.8s linear infinite;
}

/* Success Badge */
.promoter-success-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 1px solid #A7F3D0;
    border-radius: 30px;
    padding: 10px 18px;
    margin-top: 8px;
}

.promoter-success-badge svg {
    width: 18px;
    height: 18px;
    color: #10B981;
}

.promoter-success-badge span {
    color: #047857;
    font-weight: 600;
    font-size: 14px;
}

/* Submit Button */
.promoter-submit-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.promoter-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.promoter-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.promoter-submit-btn:disabled {
    background: linear-gradient(135deg, #D1D5DB 0%, #9CA3AF 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.promoter-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* Loading State Button */
.promoter-submit-btn.btn-loading {
    pointer-events: none;
}

.promoter-submit-btn.btn-loading .btn-text {
    display: none;
}

.promoter-submit-btn.btn-loading .btn-spinner {
    display: block;
}

.promoter-submit-btn .btn-spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: promoter-spin 0.8s linear infinite;
}

/* Info Text */
.promoter-info-text {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.5;
}

.promoter-info-text a {
    color: #10B981;
    text-decoration: none;
    font-weight: 500;
}

.promoter-info-text a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .swal2-popup.promoter-dialog-popup {
        padding: 30px 20px !important;
        margin: 15px !important;
        max-width: calc(100vw - 30px) !important;
        border-radius: 20px !important;
    }

    .promoter-icon-container {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .promoter-icon-container svg {
        width: 40px;
        height: 40px;
    }

    .promoter-dialog-title {
        font-size: 22px;
    }

    .promoter-dialog-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .promoter-input {
        padding: 14px 45px 14px 44px;
        font-size: 15px;
    }

    .promoter-submit-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .swal2-popup.promoter-dialog-popup {
        background: rgba(31, 41, 55, 0.95) !important;
        border-color: rgba(75, 85, 99, 0.3) !important;
    }

    .promoter-dialog-title {
        color: #F9FAFB;
    }

    .promoter-dialog-subtitle {
        color: #9CA3AF;
    }

    .promoter-input {
        background: rgba(55, 65, 81, 0.8);
        border-color: #4B5563;
        color: #F9FAFB;
    }

    .promoter-input:focus {
        background: #374151;
    }

    .promoter-info-text {
        border-top-color: #4B5563;
    }
}
