/* ===================================
   GRUNDLÄGGANDE STILAR
   =================================== */

/* Nollställ standardmarginaler och padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Grundläggande typografi och färger */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Rubriker */
h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2a2a2a;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #3a3a3a;
}

/* Paragraf och text */
p {
    margin-bottom: 16px;
    color: #555;
}

/* ===================================
   KNAPPAR
   =================================== */

/* Primär knapp (huvudåtgärd) */
.btn-primary {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-primary:active {
    background-color: #2868a8;
}

/* Sekundär knapp (mindre framträdande) */
.btn-secondary {
    background-color: white;
    color: #4a90e2;
    border: 1px solid #4a90e2;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #f0f7ff;
}

/* ===================================
   KORT/BOXAR
   =================================== */

/* Informationsbox (används för integritetsinformation) */
.info-box {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-box h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.info-box p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 12px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Veckokort (innehåller en veckas alla dagar) */
.week-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.week-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.week-sum {
    font-size: 16px;
    color: #4a90e2;
    font-weight: 500;
}

/* Varning när inte alla dagar är ifyllda */
.week-warning {
    background-color: #fff4e5;
    border: 1px solid #ffd966;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    color: #856404;
    margin-top: 12px;
}

/* ===================================
   DAGSFÄLT (INPUT)
   =================================== */

.day-input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.day-field {
    display: flex;
    flex-direction: column;
}

.day-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.day-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.day-input:focus {
    outline: none;
    border-color: #4a90e2;
}

/* ===================================
   MODAL (POPUP FÖR STANDARDGLAS)
   =================================== */

/* Overlay som täcker hela skärmen */
.modal-overlay {
    display: none; /* Dold som standard */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Själva modalboxen */
.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 40px auto;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

/* Illustration av standardglas */
.glass-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.glass-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.glass-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.glass-description {
    font-size: 15px;
    color: #555;
}

/* Vin-guide sektion */
.wine-guide {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.wine-guide h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.wine-guide ul {
    list-style: none;
    padding-left: 0;
}

.wine-guide li {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.wine-guide li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4a90e2;
    font-weight: bold;
}

/* ===================================
   LÄNKAR
   =================================== */

.link-button {
    color: #4a90e2;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
}

.link-button:hover {
    text-decoration: underline;
}

/* ===================================
   STARTSKÄRM
   =================================== */

#welcome-screen {
    max-width: 600px;
    margin: 40px auto;
}

.welcome-content {
    text-align: left;
}

.purpose-text {
    background-color: #f0f7ff;
    border-left: 4px solid #4a90e2;
    padding: 16px;
    margin: 24px 0;
    border-radius: 4px;
}

.purpose-text p {
    margin: 0;
    color: #333;
}

.start-button-container {
    text-align: center;
    margin-top: 32px;
}

/* ===================================
   KALENDERVY
   =================================== */

#calendar-screen {
    display: none;
}

.calendar-header {
    margin-bottom: 24px;
}

.start-date-info {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* ===================================
   RESPONSIV DESIGN (MOBILANPASSNING)
   =================================== */

@media (max-width: 640px) {
    body {
        padding: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .day-input-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        margin: 20px auto;
    }
    
    .modal-header {
        padding: 20px 16px 12px;
    }
    
    .modal-body {
        padding: 20px 16px;
    }
}

/* Dölj element som standard */
.hidden {
    display: none;
}
