/**
 * Calendar Widget Styles
 * Responsive design for Microsoft Office calendar display
 */

.ovaev-calendar-widget {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Calendar Title */
.ovaev-calendar-title {
    font-size: 28px;
    font-weight: 600;
    color: #333333;
    text-align: center;
    margin: 0 0 30px 0;
    padding: 0;
    line-height: 1.3;
}

/* Calendar Container */
.ovaev-calendar-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* HTML Calendar iframe */
.ovaev-calendar-iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    display: block;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Loading State */
.ovaev-calendar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.ovaev-calendar-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.ovaev-calendar-loading p {
    margin: 0;
    color: #666666;
    font-size: 16px;
    font-weight: 500;
}

/* ICS Calendar Info Display */
.ovaev-calendar-ics-info {
    display: flex;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ovaev-calendar-ics-icon {
    flex-shrink: 0;
    margin-right: 20px;
}

.ovaev-calendar-ics-icon .dashicons {
    font-size: 48px;
    color: #0073aa;
    width: 48px;
    height: 48px;
}

.ovaev-calendar-ics-text h4 {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.ovaev-calendar-ics-text p {
    font-size: 16px;
    color: #666666;
    margin: 0;
    line-height: 1.5;
    max-width: 400px;
}

/* Button Container */
.ovaev-calendar-button-container {
    text-align: center;
    margin-top: 20px;
}

/* Calendar Button */
.ovaev-calendar-button {
    display: inline-block;
    padding: 15px 30px;
    background: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #0073aa;
    cursor: pointer;
    line-height: 1.4;
    min-width: 200px;
}

.ovaev-calendar-button:hover {
    background: #005a87;
    border-color: #005a87;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.ovaev-calendar-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.ovaev-calendar-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ovaev-calendar-widget {
        padding: 15px;
        margin: 10px;
    }
    
    .ovaev-calendar-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .ovaev-calendar-iframe {
        min-height: 500px;
    }
    
    .ovaev-calendar-ics-info {
        flex-direction: column;
        padding: 30px 15px;
        text-align: center;
    }
    
    .ovaev-calendar-ics-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .ovaev-calendar-ics-text h4 {
        font-size: 18px;
    }
    
    .ovaev-calendar-ics-text p {
        font-size: 14px;
    }
    
    .ovaev-calendar-button {
        padding: 12px 25px;
        font-size: 15px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .ovaev-calendar-widget {
        padding: 10px;
        margin: 5px;
    }
    
    .ovaev-calendar-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .ovaev-calendar-iframe {
        min-height: 400px;
    }
    
    .ovaev-calendar-ics-info {
        padding: 20px 10px;
    }
    
    .ovaev-calendar-ics-icon .dashicons {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }
    
    .ovaev-calendar-ics-text h4 {
        font-size: 16px;
    }
    
    .ovaev-calendar-ics-text p {
        font-size: 13px;
    }
    
    .ovaev-calendar-button {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 160px;
    }
}

/* Print Styles */
@media print {
    .ovaev-calendar-widget {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ovaev-calendar-button {
        display: none;
    }
    
    .ovaev-calendar-iframe {
        min-height: 800px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ovaev-calendar-widget {
        border: 2px solid #000000;
    }
    
    .ovaev-calendar-title {
        color: #000000;
    }
    
    .ovaev-calendar-button {
        border: 2px solid #000000;
        color: #000000;
        background: #ffffff;
    }
    
    .ovaev-calendar-button:hover {
        background: #000000;
        color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ovaev-calendar-button {
        transition: none;
    }
    
    .ovaev-calendar-button:hover {
        transform: none;
    }
}
