/* Greet Card Frontend Styles */

/* Birthday Posts */
.greet-card-birthday-post {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.greet-card-birthday-post::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
}

@keyframes sparkle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.greet-card-birthday-post h2 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.greet-card-birthday-post .birthday-content {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.greet-card-birthday-post .birthday-meta {
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* Birthday Icons */
.birthday-icon {
    font-size: 2em;
    margin: 0 10px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Birthday Widget */
.greet-card-widget {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.greet-card-widget h3 {
    color: #d63384;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.greet-card-widget .birthday-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.greet-card-widget .birthday-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.greet-card-widget .birthday-item:last-child {
    border-bottom: none;
}

.greet-card-widget .birthday-name {
    font-weight: 600;
    color: #333;
}

.greet-card-widget .birthday-date {
    color: #666;
    font-size: 0.9em;
}

.greet-card-widget .birthday-age {
    background: #d63384;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

/* Today's Birthday Special */
.birthday-today {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    }
    to {
        box-shadow: 0 5px 25px rgba(255, 107, 107, 0.8);
    }
}

/* Shortcode Styles */
.greet-card-shortcode {
    margin: 20px 0;
}

.greet-card-today-birthdays {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.greet-card-today-birthdays h4 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 15px;
}

.greet-card-upcoming-birthdays {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.greet-card-upcoming-birthdays h4 {
    color: #0c5460;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Birthday Card Styles */
.birthday-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 15px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.birthday-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.birthday-card::before {
    content: '🎉';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    opacity: 0.3;
}

.birthday-card .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.birthday-card .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 15px;
}

.birthday-card .card-info h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1em;
}

.birthday-card .card-info .birthday-date {
    color: #666;
    font-size: 0.9em;
}

.birthday-card .card-content {
    color: #555;
    line-height: 1.5;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f39c12;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; background: #e74c3c; }
.confetti:nth-child(2) { left: 20%; animation-delay: 0.5s; background: #3498db; }
.confetti:nth-child(3) { left: 30%; animation-delay: 1s; background: #2ecc71; }
.confetti:nth-child(4) { left: 40%; animation-delay: 1.5s; background: #f39c12; }
.confetti:nth-child(5) { left: 50%; animation-delay: 2s; background: #9b59b6; }
.confetti:nth-child(6) { left: 60%; animation-delay: 2.5s; background: #e67e22; }
.confetti:nth-child(7) { left: 70%; animation-delay: 3s; background: #1abc9c; }
.confetti:nth-child(8) { left: 80%; animation-delay: 3.5s; background: #34495e; }
.confetti:nth-child(9) { left: 90%; animation-delay: 4s; background: #e91e63; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Birthday Banner */
.birthday-banner {
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin: 30px 0;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.birthday-banner h2 {
    font-size: 3em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

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

.birthday-banner p {
    font-size: 1.3em;
    margin: 0;
    opacity: 0.9;
}

/* Age Badge */
.age-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    display: inline-block;
    margin: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .greet-card-birthday-post {
        padding: 20px;
        margin: 15px 0;
    }
    
    .greet-card-birthday-post h2 {
        font-size: 2em;
    }
    
    .birthday-banner h2 {
        font-size: 2em;
    }
    
    .birthday-banner p {
        font-size: 1.1em;
    }
    
    .birthday-card {
        padding: 20px;
    }
    
    .birthday-card .card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .birthday-card .avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .greet-card-birthday-post {
        padding: 15px;
    }
    
    .greet-card-birthday-post h2 {
        font-size: 1.8em;
    }
    
    .birthday-banner {
        padding: 30px 15px;
    }
    
    .birthday-banner h2 {
        font-size: 1.8em;
    }
    
    .greet-card-widget {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .greet-card-birthday-post,
    .birthday-card,
    .greet-card-widget {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .birthday-banner {
        background: #f0f0f0 !important;
        color: #333 !important;
    }
    
    .confetti {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .greet-card-widget {
        background: #2c3338;
        color: #f0f0f1;
    }
    
    .greet-card-widget h3 {
        color: #ff6b9d;
    }
    
    .birthday-card {
        background: #2c3338;
        color: #f0f0f1;
    }
    
    .birthday-card .card-info h5 {
        color: #f0f0f1;
    }
    
    .greet-card-today-birthdays {
        background: #3c434a;
        border-color: #50575e;
        color: #f0f0f1;
    }
    
    .greet-card-upcoming-birthdays {
        background: #3c434a;
        border-color: #50575e;
        color: #f0f0f1;
    }
}

/* Accessibility Improvements */
.greet-card-birthday-post:focus,
.birthday-card:focus {
    outline: 3px solid #d63384;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .birthday-icon,
    .confetti,
    .birthday-banner h2 {
        animation: none;
    }
    
    .birthday-card:hover {
        transform: none;
    }
    
    .greet-card-birthday-post::before {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .greet-card-birthday-post,
    .birthday-card,
    .greet-card-widget {
        border: 2px solid;
    }
    
    .birthday-banner {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff;
    }
}

/* Custom Properties for Easy Theming */
:root {
    --greet-card-primary: #d63384;
    --greet-card-secondary: #667eea;
    --greet-card-success: #28a745;
    --greet-card-warning: #ffc107;
    --greet-card-danger: #dc3545;
    --greet-card-info: #17a2b8;
    --greet-card-light: #f8f9fa;
    --greet-card-dark: #343a40;
    --greet-card-border-radius: 8px;
    --greet-card-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --greet-card-transition: all 0.3s ease;
}

/* Theme Variations */
.greet-card-theme-elegant .greet-card-birthday-post {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.greet-card-theme-vibrant .greet-card-birthday-post {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.greet-card-theme-ocean .greet-card-birthday-post {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.greet-card-theme-sunset .greet-card-birthday-post {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

/* Loading States */
.greet-card-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.greet-card-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #d63384;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error States */
.greet-card-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: var(--greet-card-border-radius);
    padding: 15px;
    margin: 15px 0;
}

/* Empty States */
.greet-card-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.greet-card-empty .empty-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.greet-card-empty h4 {
    margin-bottom: 10px;
    color: #495057;
}

.greet-card-empty p {
    margin: 0;
    font-size: 0.9em;
}