/* Carded Modal - Business Card QR Code Modal */

.carded-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    overflow-y: auto;
}

.carded-modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.carded-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.carded-content {
    position: relative;
    background: white;
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    padding: 2rem;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.carded-modal.active .carded-content {
    transform: scale(1) translateY(0);
}

.carded-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: var(--warm-cream);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 20;
}

.carded-close:hover {
    background: var(--primary-purple);
    color: white;
    transform: rotate(90deg);
}

/* Fun header section */
.carded-header {
    margin-bottom: 1.5rem;
    position: relative;
}

.carded-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--coral-accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
    animation: cardedPulse 2s ease-in-out infinite;
    font-family: var(--font-heading);
}

@keyframes cardedPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.carded-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.carded-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: cardedWiggle 1s ease-in-out infinite;
    color: var(--primary-purple);
}

@keyframes cardedWiggle {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

.carded-message {
    background: linear-gradient(135deg, var(--warm-cream) 0%, rgba(139, 90, 143, 0.05) 100%);
    padding: 1.25rem;
    border-radius: 15px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(139, 90, 143, 0.1);
}

.carded-message p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-align: justify;
}

.carded-message p:last-child {
    margin-bottom: 0;
}

/* Form section inherits existing form styles from main CSS */
.carded-form-section {
    margin-top: 1rem;
}

.carded-form-section h3 {
    color: var(--primary-purple);
    margin-bottom: 0.75rem;
    font-weight: 800;
    font-size: 1.375rem;
}

.carded-form-section .form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.carded-form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.carded-form-section label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.carded-form-section input,
.carded-form-section select,
.carded-form-section textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--warm-cream);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-weight: 450;
}

.carded-form-section input:focus,
.carded-form-section select:focus,
.carded-form-section textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 90, 143, 0.1);
}

.carded-submit {
    text-align: center;
    margin-top: 1.5rem;
}

.carded-submit-button {
    background: var(--primary-purple);
    color: white;
    padding: 1.25rem 3rem;
    border: none;
    border-radius: 30px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 6px 20px rgba(139, 90, 143, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-accent);
}

.carded-submit-button:hover {
    background: var(--primary-purple-dark);
    box-shadow: 0 10px 30px rgba(139, 90, 143, 0.5);
    transform: translateY(-3px);
}

.carded-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: none;
    animation: cardedShine 3s ease-in-out infinite;
}

@keyframes cardedShine {
    0% {
        left: -100%;
    }
    10%, 100% {
        left: 100%;
    }
}

.carded-disclaimer {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-style: italic;
}

.carded-disclaimer i {
    font-size: 1rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .carded-modal {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 1rem;
    }
    
    .carded-content {
        padding: 1.5rem;
        margin: 0;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        max-height: calc(100vh - 1rem);
        border-radius: 20px;
    }
    
    .carded-close {
        top: 1rem;
        right: 1rem;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .carded-title {
        font-size: 2rem;
    }
    
    .carded-icon {
        font-size: 2.5rem;
    }
    
    .carded-form-section .form-row {
        grid-template-columns: 1fr;
    }
    
    .carded-message {
        padding: 1.5rem;
    }
}

/* Fun decorative elements - positioned to not interfere */
.carded-content::before {
    content: '\f005'; /* FontAwesome star */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
    animation: cardedTwinkle 2s ease-in-out infinite;
    opacity: 0.4;
    color: var(--sage-green);
    z-index: 1;
}

.carded-content::after {
    content: '\f4ad'; /* FontAwesome medal */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    animation: cardedTwinkle 2.5s ease-in-out infinite;
    opacity: 0.4;
    color: var(--coral-accent);
    z-index: 1;
}

@keyframes cardedTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Additional fun elements for mobile */
@media (max-width: 768px) {
    .carded-content::before,
    .carded-content::after {
        display: none; /* Hide decorative elements on mobile to save space */
    }
}