/**
 * Personal Weather Station - Minimal Layout Styles
 * 
 * Provides layout utilities only - inherits theme colors, fonts, and spacing
 */

/* Container */
.pws-widget {
    max-width: 100%;
    margin: 1em 0;
}

/* Flexbox Layout Utilities */
.pws-flex {
    display: flex;
}

.pws-flex-row {
    flex-direction: row;
    flex-wrap: wrap;
}

.pws-flex-col {
    flex-direction: column;
}

.pws-flex-1 {
    flex: 1;
    min-width: 0; /* Prevent flex item overflow */
}

.pws-flex-2 {
    flex: 2;
}

.pws-flex-3 {
    flex: 3;
}

/* Grid Layout */
.pws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Spacing Utilities */
.pws-spacing {
    gap: 1rem;
}

.pws-spacing-sm {
    gap: 0.5rem;
}

/* Typography Utilities */
.pws-large {
    font-size: 3em;
    line-height: 1;
}

.pws-medium {
    font-size: 1.5em;
    line-height: 1.5em;
}

.pws-small {
    font-size: 0.875em;
}

.pws-bold {
    font-weight: 700;
}

.pws-uppercase {
    text-transform: uppercase;
}

/* Text Alignment */
.pws-text-center {
    text-align: center;
}

.pws-text-left {
    text-align: left;
}

.pws-text-right {
    text-align: right;
}

/* Wind Dial Specific */
.pws-dial-container {
    position: relative;
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

.pws-dial-bg {
    opacity: 0.3;;
    width: 100%;
    height: auto;
    display: block;
}

.pws-dial-direction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5em;
}

.pws-dial-arrow {
    opacity: 0.9;
    position: absolute;
    top: 25%;
    left: 50%;
    width: 50%;
    height: 50%;
    transform-origin: 0% 50%;
    pointer-events: none;
}

.pws-dial-arrow img {
    width: 100%;
    height: 100%;
}

/* Widget Sections */
.pws-widget__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pws-widget__temp,
.pws-widget__dial,
.pws-widget__wind {
    text-align: center;
}

.pws-widget__metric {
    text-align: center;
}

.pws-temp-value {
    margin-bottom: 0.5rem;
}

/* Unit Labels */
.pws-unit {
    font-size: 0.875em;
    opacity: 0.8;
}

/* Warning/Error Messages */
.pws-warning {
    padding: 0.5em;
    margin-bottom: 1em;
    border-left: 3px solid #f0ad4e;
    background-color: rgba(240, 173, 78, 0.1);
}

.pws-error {
    padding: 0.75em;
    margin: 1em 0;
    border-left: 3px solid #d9534f;
    background-color: rgba(217, 83, 79, 0.1);
}

.pws-error-code {
    margin-top: 0.5em;
    opacity: 0.7;
}

/* Responsive Breakpoint */
@media (max-width: 767px) {
    /* Stack layout on mobile */
    .pws-flex-row {
        flex-direction: column;
    }
    
    .pws-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pws-large {
        font-size: 2.5em;
    }
    
    .pws-medium {
        font-size: 1.25em;
    }
    
    .pws-dial-container {
        max-width: 120px;
    }
}

@media (min-width: 768px) {
    .pws-widget__temp,
    .pws-widget__dial,
    .pws-widget__wind {
        min-width: 150px;
    }
}
