/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Base Styles */
.crm-dashboard-quote,
.crm-dashboard-date,
.crm-dashboard-time,
.crm-dashboard-weather,
.crm-dashboard-datetime,
.crm-dashboard-full {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Quote Styles */
.crm-dashboard-quote {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    border-radius: 8px;
}

.crm-quote-text {
    margin: 0;
    font-style: italic;
}

.crm-quote-text p {
    margin: 0 0 15px 0;
    font-size: 18px;
    line-height: 1.5;
    color: #2c3e50;
}

.crm-quote-author {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-style: normal;
    font-weight: 600;
}

.crm-quote-category {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 8px;
    background: #0073aa;
    color: #fff;
    font-size: 12px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Quote Style Variations */
.crm-quote-style-minimal {
    background: transparent;
    border: none;
    padding: 15px 0;
}

.crm-quote-style-minimal .crm-quote-text p {
    font-size: 16px;
    color: #555;
}

.crm-quote-style-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.crm-quote-style-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.crm-quote-style-highlight .crm-quote-text p {
    color: #fff;
}

.crm-quote-style-highlight .crm-quote-author {
    color: rgba(255,255,255,0.9);
}

/* Date Styles */
.crm-dashboard-date {
    text-align: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 10px 0;
}

.crm-date-weekday {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.crm-date-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

/* Time Styles */
.crm-dashboard-time {
    text-align: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 10px 0;
}

.crm-time-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.crm-time-greeting {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* DateTime Combined Styles */
.crm-dashboard-datetime {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 10px 0;
}

.crm-datetime-date,
.crm-datetime-time {
    flex: 1;
    text-align: center;
}

/* DateTime Style Variations */
.crm-datetime-style-compact {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

.crm-datetime-style-large .crm-time-value {
    font-size: 32px;
}

.crm-datetime-style-large .crm-date-value {
    font-size: 20px;
}

.crm-datetime-style-digital {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
}

.crm-datetime-style-digital .crm-time-value,
.crm-datetime-style-digital .crm-date-value {
    color: #00ff00;
}

/* Weather Styles */
.crm-dashboard-weather {
    padding: 15px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

.crm-weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.crm-weather-icon {
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.crm-weather-temp {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.crm-weather-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.crm-weather-humidity {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.crm-weather-city {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

/* Weather Icons */
.crm-weather-icon.sunny { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFA500"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>'); }
.crm-weather-icon.cloudy { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23808080"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>'); }
.crm-weather-icon.rainy { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234682B4"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/><path d="M8 21l2-4M12 21l2-4M16 21l2-4"/></svg>'); }
.crm-weather-icon.snowy { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23E6E6FA"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/><circle cx="8" cy="21" r="1"/><circle cx="12" cy="21" r="1"/><circle cx="16" cy="21" r="1"/></svg>'); }

/* Weather Style Variations */
.crm-weather-style-compact {
    padding: 10px;
}

.crm-weather-style-compact .crm-weather-main {
    flex-direction: column;
    gap: 5px;
}

.crm-weather-style-compact .crm-weather-temp {
    font-size: 20px;
}

.crm-weather-style-detailed .crm-weather-humidity {
    display: block;
}

.crm-weather-style-card {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: none;
}

/* Full Dashboard Styles */
.crm-dashboard-full {
    margin: 20px 0;
}

.crm-dashboard-layout-grid {
    display: grid;
    gap: 20px;
}

.crm-dashboard-cols-1 { grid-template-columns: 1fr; }
.crm-dashboard-cols-2 { grid-template-columns: repeat(2, 1fr); }
.crm-dashboard-cols-3 { grid-template-columns: repeat(3, 1fr); }
.crm-dashboard-cols-4 { grid-template-columns: repeat(4, 1fr); }

.crm-dashboard-layout-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.crm-dashboard-layout-horizontal {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.crm-dashboard-layout-masonry {
    columns: 2;
    column-gap: 20px;
}

.crm-dashboard-layout-masonry > * {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Dashboard Style Variations */
.crm-dashboard-style-modern .crm-dashboard-quote,
.crm-dashboard-style-modern .crm-dashboard-date,
.crm-dashboard-style-modern .crm-dashboard-time,
.crm-dashboard-style-modern .crm-dashboard-weather {
    background: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 16px;
}

.crm-dashboard-style-minimal .crm-dashboard-quote,
.crm-dashboard-style-minimal .crm-dashboard-date,
.crm-dashboard-style-minimal .crm-dashboard-time,
.crm-dashboard-style-minimal .crm-dashboard-weather {
    background: transparent;
    border: 1px solid #e1e5e9;
    box-shadow: none;
}

.crm-dashboard-style-corporate {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.crm-dashboard-style-corporate .crm-dashboard-quote,
.crm-dashboard-style-corporate .crm-dashboard-date,
.crm-dashboard-style-corporate .crm-dashboard-time,
.crm-dashboard-style-corporate .crm-dashboard-weather {
    background: #fff;
    border: 1px solid #dee2e6;
}

.crm-dashboard-style-colorful .crm-dashboard-quote {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.crm-dashboard-style-colorful .crm-dashboard-date {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.crm-dashboard-style-colorful .crm-dashboard-time {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.crm-dashboard-style-colorful .crm-dashboard-weather {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

/* Error States */
.crm-no-quote,
.crm-no-weather {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    text-align: center;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crm-dashboard-cols-2,
    .crm-dashboard-cols-3,
    .crm-dashboard-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .crm-dashboard-layout-horizontal {
        flex-direction: column;
    }
    
    .crm-dashboard-layout-masonry {
        columns: 1;
    }
    
    .crm-dashboard-datetime {
        flex-direction: column;
        gap: 10px;
    }
    
    .crm-weather-main {
        flex-direction: column;
        gap: 10px;
    }
    
    .crm-quote-text p {
        font-size: 16px;
    }
    
    .crm-time-value {
        font-size: 20px;
    }
    
    .crm-weather-temp {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .crm-dashboard-quote,
    .crm-dashboard-date,
    .crm-dashboard-time,
    .crm-dashboard-weather,
    .crm-dashboard-datetime {
        padding: 10px;
        margin: 10px 0;
    }
    
    .crm-quote-text p {
        font-size: 14px;
    }
    
    .crm-time-value {
        font-size: 18px;
    }
    
    .crm-weather-temp {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .crm-dashboard-quote,
    .crm-dashboard-date,
    .crm-dashboard-time,
    .crm-dashboard-weather,
    .crm-dashboard-datetime {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .crm-weather-icon {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .crm-dashboard-quote,
    .crm-dashboard-date,
    .crm-dashboard-time,
    .crm-dashboard-weather,
    .crm-dashboard-datetime {
        background: #2c3338;
        border-color: #3c434a;
        color: #f0f0f1;
    }
    
    .crm-quote-text p,
    .crm-date-value,
    .crm-time-value,
    .crm-weather-temp {
        color: #f0f0f1;
    }
    
    .crm-quote-author,
    .crm-date-weekday,
    .crm-time-greeting,
    .crm-weather-desc,
    .crm-weather-city {
        color: #b0b0b0;
    }
}

/* Accessibility */
.crm-dashboard-quote:focus,
.crm-dashboard-date:focus,
.crm-dashboard-time:focus,
.crm-dashboard-weather:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation */
@keyframes crm-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crm-dashboard-quote,
.crm-dashboard-date,
.crm-dashboard-time,
.crm-dashboard-weather {
    animation: crm-fade-in 0.5s ease-out;
}

/* Widget Specific Styles */
.widget .crm-dashboard-quote,
.widget .crm-dashboard-date,
.widget .crm-dashboard-time,
.widget .crm-dashboard-weather,
.widget .crm-dashboard-datetime {
    margin: 0 0 15px 0;
}

.widget .crm-dashboard-quote:last-child,
.widget .crm-dashboard-date:last-child,
.widget .crm-dashboard-time:last-child,
.widget .crm-dashboard-weather:last-child,
.widget .crm-dashboard-datetime:last-child {
    margin-bottom: 0;
}

