/**
 * Inactivity Popup Styles
 */

/* Overlay */
.inactivity-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inactivity-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Popup container */
.inactivity-popup {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.inactivity-popup-overlay.visible .inactivity-popup {
    transform: scale(1) translateY(0);
}

/* Content wrapper */
.inactivity-popup-content {
    padding: 2rem;
}

/* Header with image and text */
.inactivity-popup-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Image placeholder */
.inactivity-popup-image {
    flex-shrink: 0;
    width: 120px;
}

.inactivity-popup-image-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Text content */
.inactivity-popup-text {
    flex: 1;
    min-width: 0;
}

.inactivity-popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.inactivity-popup-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Form */
.inactivity-popup-form {
    margin-bottom: 1rem;
}

.popup-form-group {
    margin-bottom: 1rem;
}

/* Periodicity options */
.popup-periodicity-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.popup-radio-card {
    position: relative;
    cursor: pointer;
}

.popup-radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.popup-radio-card-content {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.popup-radio-card input:checked + .popup-radio-card-content {
    border-color: #c5a44a;
    background: rgba(197, 164, 74, 0.08);
}

.popup-radio-card:hover .popup-radio-card-content {
    border-color: #c5a44a;
}

.popup-radio-card-title {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

/* Amount row - 3 equal columns */
.popup-amount-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.popup-amount-btn {
    padding: 0.75rem 0.5rem;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-amount-btn:hover {
    border-color: #c5a44a;
}

.popup-amount-btn.active {
    border-color: #c5a44a;
    background: rgba(197, 164, 74, 0.08);
    color: #c5a44a;
}

/* Custom amount input - same size as buttons */
.popup-amount-custom {
    padding: 0.75rem 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    text-align: center;
    min-width: 0;
}

.popup-amount-custom:focus {
    outline: none;
    border-color: #c5a44a;
}

.popup-amount-custom::placeholder {
    color: #999;
    font-size: 0.85rem;
}

.popup-amount-custom.active {
    border-color: #c5a44a;
}

/* Hide number input spinners */
.popup-amount-custom::-webkit-outer-spin-button,
.popup-amount-custom::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.popup-amount-custom[type=number] {
    -moz-appearance: textfield;
}

/* Email input */
.popup-email-wrapper {
    position: relative;
}

.popup-email-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

#popup-email {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

#popup-email:focus {
    outline: none;
    border-color: #c5a44a;
}

#popup-email::placeholder {
    color: #aaa;
}

/* Error message */
.popup-form-error {
    background: #fee;
    color: #c00;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Primary button */
.popup-primary-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #c5a44a 0%, #b8963d 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.popup-primary-btn:hover {
    background: linear-gradient(135deg, #b8963d 0%, #a68530 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(197, 164, 74, 0.3);
}

.popup-primary-btn:active {
    transform: translateY(0);
}

.popup-primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.popup-primary-btn.loading {
    position: relative;
    color: transparent;
}

.popup-primary-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: popup-spin 0.8s linear infinite;
}

@keyframes popup-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Secondary button */
.popup-secondary-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
    text-align: center;
}

.popup-secondary-btn:hover {
    color: #555;
}

/* Responsive */
@media (max-width: 600px) {
    .inactivity-popup-content {
        padding: 1.5rem;
    }

    .inactivity-popup-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .inactivity-popup-image {
        width: 100px;
    }

    .inactivity-popup-image-placeholder {
        width: 100px;
        height: 100px;
    }

    .inactivity-popup-title {
        font-size: 1.1rem;
    }

    .inactivity-popup-description {
        font-size: 0.9rem;
    }

    .popup-periodicity-options {
        grid-template-columns: 1fr 1fr;
    }

    .popup-amount-presets {
        grid-template-columns: 1fr 1fr;
    }

    .popup-amount-btn {
        font-size: 1rem;
        padding: 0.625rem 0.75rem;
    }
}

@media (max-width: 400px) {
    .inactivity-popup-content {
        padding: 1.25rem;
    }
}
