/**
 * Guruvayoor Services - Common User Info Popup
 * Color scheme matching photography modal
 * 
 * @package GuruvayoorServices
 * @since 1.0
 */

:root {
    /* Main colors from photography modal */
    --gv-popup-primary: #003366;
    /* Dark blue */
    --gv-popup-primary-dark: #004488;
    /* Slightly lighter blue for hover */
    --gv-popup-secondary: #FF9933;
    /* Orange */
    --gv-popup-secondary-dark: #e68829;
    /* Darker orange for hover */
    --gv-popup-accent: #FF9933;
    /* Orange accent */
    --gv-popup-light-bg: #FFF8E7;
    /* Light cream background */
    --gv-popup-success: #0a875a;
    /* Green for success */
    --gv-popup-danger: #dc2626;
    /* Red for errors */
    --gv-popup-warning: #f59e0b;
    /* Yellow for warnings */
    /* Text colors */
    --gv-popup-text: #000000;
    --gv-popup-text-light: #555555;
    --gv-popup-text-white: #FFFFFF;
    --gv-popup-text-muted: rgba(255, 255, 255, 0.9);
    /* Background colors */
    --gv-popup-bg: #FFFFFF;
    --gv-popup-overlay: rgba(0, 0, 0, 0.5);
    --gv-popup-border: #e0e0e0;
    --gv-popup-shadow: rgba(0, 51, 102, 0.08);
    /* Gradients */
    --gv-popup-gradient-primary: linear-gradient(135deg, #003366 0%, #004488 100%);
    --gv-popup-gradient-secondary: linear-gradient(135deg, #FF9933 0%, #e68829 100%);
    --gv-popup-gradient-overlay: linear-gradient(to bottom, transparent 0%, rgba(0, 51, 102, 0.9) 100%);
}


/* Popup Overlay */

.gv-user-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gv-popup-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
    animation: gvFadeIn 0.3s ease;
}

.gv-user-popup-overlay.active {
    display: flex;
}


/* Popup Container */

.gv-user-popup {
    background: var(--gv-popup-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: gvSlideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}


/* Popup Header */

.gv-popup-header {
    background: var(--gv-popup-gradient-primary);
    padding: 30px 30px 40px;
    position: relative;
    overflow: hidden;
}

.gv-popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: gvRotate 20s linear infinite;
}

.gv-popup-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.gv-popup-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gv-popup-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--gv-popup-text-white);
}

.gv-popup-title {
    color: var(--gv-popup-text-white);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    font-family: "Cormorant Garamond", serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gv-popup-subtitle {
    color: var(--gv-popup-text-muted);
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}


/* Popup Body */

.gv-popup-body {
    padding: 30px;
    background: var(--gv-popup-bg);
}

.gv-popup-form-group {
    margin-bottom: 25px;
}

.gv-popup-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-family: "Cormorant Garamond", serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--gv-popup-primary);
}

.gv-popup-label span {
    color: var(--gv-popup-danger);
    margin-left: 4px;
    font-size: 16px;
}


/* Form Row for two columns */

.gv-popup-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.gv-popup-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gv-popup-border);
    border-radius: 12px;
    font-family: "Playfair Display", serif;
    font-size: 16px;
    color: var(--gv-popup-text);
    background: var(--gv-popup-light-bg);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.gv-popup-input:focus {
    outline: none;
    border-color: var(--gv-popup-secondary);
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.2);
    background: var(--gv-popup-bg);
}

.gv-popup-input.error {
    border-color: var(--gv-popup-danger);
    animation: gvShake 0.3s ease;
}

.gv-popup-error {
    color: var(--gv-popup-danger);
    font-size: 13px;
    margin-top: 8px;
    display: none;
    font-family: "Playfair Display", serif;
    padding-left: 46px;
}

.gv-popup-error.show {
    display: block;
}


/* Checkbox */

.gv-popup-remember {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0 0;
    padding-left: 46px;
}

.gv-popup-remember input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--gv-popup-secondary);
}

.gv-popup-remember label {
    color: var(--gv-popup-text-light);
    font-size: 15px;
    cursor: pointer;
    font-family: "Playfair Display", serif;
}


/* Buttons */

.gv-popup-footer {
    padding: 0 30px 30px;
    background: var(--gv-popup-bg);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.gv-popup-btn {
    width: 100%;
    padding: 18px 20px;
    background: var(--gv-popup-gradient-secondary);
    color: var(--gv-popup-text-white);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    font-family: "Cormorant Garamond", serif;
}

.gv-popup-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.gv-popup-btn:hover::before {
    width: 300px;
    height: 300px;
}

.gv-popup-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 153, 51, 0.4);
}

.gv-popup-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gv-popup-btn .btn-text {
    position: relative;
    z-index: 2;
    color: white;
    font-weight: bold;
}

.gv-popup-btn .btn-icon {
    width: 20px;
    height: 20px;
    fill: var(--gv-popup-text-white);
    position: relative;
    z-index: 2;
    animation: gvSlideRight 0.5s infinite alternate;
}


/* Close button */

.gv-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gv-popup-bg);
    border: none;
    color: var(--gv-popup-primary);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gv-popup-close:hover {
    background: var(--gv-popup-secondary);
    color: var(--gv-popup-text-white);
    transform: rotate(90deg);
}


/* Loading spinner */

.gv-popup-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--gv-popup-text-white);
    border-radius: 50%;
    animation: gvSpin 1s linear infinite;
}

.gv-popup-btn.loading .btn-text {
    display: none;
}

.gv-popup-btn.loading .gv-popup-spinner {
    display: block;
}


/* Success state */

.gv-popup-success {
    text-align: center;
    padding: 20px 0;
    display: none;
}

.gv-popup-success.show {
    display: block;
    animation: gvFadeIn 0.5s ease;
}

.gv-popup-success-icon {
    width: 80px;
    height: 80px;
    background: var(--gv-popup-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: gvScale 0.5s ease;
}

.gv-popup-success-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--gv-popup-text-white);
}

.gv-popup-success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gv-popup-success);
    margin: 0 0 10px;
    font-family: "Cormorant Garamond", serif;
}

.gv-popup-success-message {
    color: var(--gv-popup-text-light);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
    font-family: "Playfair Display", serif;
}


/* Animations */

@keyframes gvFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes gvSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gvShake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-10px);
    }
    40% {
        transform: translateX(10px);
    }
    60% {
        transform: translateX(-5px);
    }
    80% {
        transform: translateX(5px);
    }
}

@keyframes gvSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes gvRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes gvSlideRight {
    from {
        transform: translateX(-5px);
    }
    to {
        transform: translateX(5px);
    }
}

@keyframes gvScale {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}


/* Responsive */

@media (max-width: 768px) {
    .gv-popup-header {
        padding: 25px 20px 35px;
    }
    .gv-popup-body,
    .gv-popup-footer {
        padding: 20px;
    }
    .gv-popup-title {
        font-size: 24px;
    }
    .gv-popup-subtitle {
        font-size: 15px;
    }
    .gv-popup-icon {
        width: 70px;
        height: 70px;
    }
    .gv-popup-icon svg {
        width: 35px;
        height: 35px;
    }
    .gv-popup-label {
        font-size: 18px;
    }
    .gv-popup-input {
        padding: 14px 18px;
        font-size: 15px;
    }
    .gv-popup-remember {
        padding-left: 0;
    }
    .gv-popup-error {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .gv-popup-header {
        padding: 20px 15px 30px;
    }
    .gv-popup-body,
    .gv-popup-footer {
        padding: 15px;
    }
    .gv-popup-title {
        font-size: 22px;
    }
    .gv-popup-subtitle {
        font-size: 14px;
    }
    .gv-popup-icon {
        width: 60px;
        height: 60px;
    }
    .gv-popup-icon svg {
        width: 30px;
        height: 30px;
    }
    .gv-popup-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .gv-popup-label {
        font-size: 17px;
    }
    .gv-popup-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
    .gv-popup-btn {
        padding: 16px;
        font-size: 17px;
    }
    .gv-popup-success-icon {
        width: 70px;
        height: 70px;
    }
    .gv-popup-success-icon svg {
        width: 35px;
        height: 35px;
    }
    .gv-popup-success-title {
        font-size: 22px;
    }
    .gv-popup-success-message {
        font-size: 15px;
    }
}


/* Body lock when modal is open */

body.gv-modal-open {
    overflow: hidden !important;
}


/* Accessibility */

.gv-popup-close:focus,
.gv-popup-btn:focus,
.gv-popup-input:focus {
    outline: 2px solid var(--gv-popup-secondary);
    outline-offset: 2px;
}