/**
 * Frontend Styles for WS Archives
 * Wine Spies inspired design
 */

/* Checkout Shipping Options */
.wsa-shipping-options {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.wsa-shipping-options h1.wsa-section-title {
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.wsa-shipping-options .wsa-section-intro {
    margin: 6px 0 16px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
}

.wsa-shipping-choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.wsa-choice {
    position: relative;
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: block;
    width: 100%;
}

.wsa-choice.active {
    border-color: #c59b2d; /* active outline */
    box-shadow: 0 4px 12px rgba(197, 155, 45, 0.15);
}

.wsa-choice:hover {
    border-color: #e0b64c; /* hover outline */
    box-shadow: 0 4px 12px rgba(224, 182, 76, 0.18);
}

/* Ice Pack choice styled like selection card but blue theme */
.wsa-choice.wsa-icepack {
    position: relative;
    border-color: #2196f3;
    background: #e3f2fd;
}
.wsa-choice.wsa-icepack.active,
.wsa-choice.wsa-icepack:hover {
    border-color: #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.12);
}
.wsa-choice.wsa-icepack .wsa-checkmark {
    background: #1976d2;
}
/* snowflake image removed; using emoji in heading */

.wsa-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wsa-choice-content h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.wsa-choice-content p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.4;
}

/* Emoji bullet list inside choice cards */
.wsa-choice-content ul.wsa-bullets {
    margin: 6px 0 0 0;
    padding: 0;
    list-style: none;
}
.wsa-choice-content ul.wsa-bullets li {
    margin: 6px 0;
    padding-left: 28px;
    position: relative;
    color: #444;
    font-size: 16px;
}
.wsa-choice-content ul.wsa-bullets li::before {
    content: '🍷';
    position: absolute;
    left: 0;
    top: 0;
    line-height: 1.2;
    font-size: 18px;
}

.wsa-checkmark {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: #c59b2d;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wsa-choice.active .wsa-checkmark {
    opacity: 1;
}

.wsa-choice.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.wsa-choice.disabled .wsa-checkmark {
    opacity: 0 !important;
}

.wsa-or {
    color: #999;
    font-weight: 600;
    text-align: center;
    padding: 10px 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wsa-ship-date-selector {
    margin-top: 15px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.wsa-ship-date-selector label {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #666;
}

.wsa-ship-date-selector input[type="date"] {
    margin-left: 10px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background: white;
}

.wsa-ship-date-selector small {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 12px;
}

.wsa-archive-status {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e8f4fd;
    border-radius: 4px;
    font-size: 13px;
    color: #2c5aa0;
}

/* Progress bar for archive fill */
.wsa-progress-wrap { margin-top:8px; }
.wsa-progress-label { font-size:12px; color:#666; margin-bottom:4px; }
.wsa-progress { width:100%; height:8px; background:#eee; border-radius:4px; overflow:hidden; }
.wsa-progress-bar { height:100%; background:#c59b2d; width:0; transition:width .3s ease; }

.wsa-archive-ready {
    margin-top: 10px;
    padding: 8px 12px;
    background: #d4edda;
    border-radius: 4px;
    font-size: 13px;
    color: #155724;
    font-weight: 600;
}

.wsa-shipping-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.wsa-shipping-note p {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Ice pack info */
.wsa-icepack-info {
    margin-top: 12px;
    padding: 12px;
    background: #f5faff;
    border-left: 4px solid #2196f3;
    border-radius: 6px;
    color: #1b4b72;
}
.wsa-icepack-info p { margin: 6px 0; }

/* Guest Message */
.wsa-guest-message {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    text-align: center;
}

.wsa-guest-message h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.wsa-guest-message p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.wsa-guest-message .button {
    background: white !important;
    color: #667eea !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Archives Page Styles */
.wsa-archives-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wsa-archives-header {
    margin-bottom: 30px;
}

.wsa-archives-header h2 {
    margin: 0 0 10px 0;
    color: #cc3333;
    font-size: 28px;
    font-weight: 700;
}

.wsa-archives-description {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Current Archive */
.wsa-current-archive {
    margin-bottom: 40px;
}

.wsa-ready-case,
.wsa-building-archive {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.wsa-ready-case {
    border-color: #28a745;
    background: #f8fff9;
}

.wsa-case-header,
.wsa-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wsa-case-header h3 {
    margin: 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

.wsa-case-status.ready {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wsa-bottle-count {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.wsa-bottle-count .wsa-total {
    color: #999;
    font-weight: 400;
}

.wsa-created-date {
    color: #999;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bottle Display (Wine Spies Style) */
.wsa-bottle-display {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.wsa-bottle {
    font-size: 32px;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.wsa-bottle.filled {
    filter: none;
}

.wsa-bottle.empty {
    opacity: 0.3;
}

/* Archive Status */
.wsa-archive-status {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #cc3333;
}

.wsa-archive-status p {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Current Items */
.wsa-current-items {
    margin-top: 25px;
}

.wsa-current-items h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.wsa-items-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.wsa-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wsa-item:last-child {
    border-bottom: none;
}

.wsa-item-name {
    color: #333;
    font-weight: 500;
}

.wsa-item-qty {
    color: #666;
    font-size: 14px;
}

/* Case Actions */
.wsa-case-actions {
    text-align: center;
    margin-top: 20px;
}

.wsa-ship-case-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.wsa-ship-case-btn:hover {
    background: #218838;
}

.wsa-view-case-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
}

/* Empty State */
.wsa-empty-archive {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 40px;
}

.wsa-empty-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
}

.wsa-empty-content p {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 16px;
}

.wsa-bottle-display.empty {
    margin: 30px 0;
    opacity: 0.4;
}

.wsa-empty-instructions {
    margin: 30px 0 !important;
    font-style: italic;
    color: #999 !important;
}

.wsa-shop-btn {
    background: #cc3333 !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
}

/* Archive History */
.wsa-archive-history {
    margin-top: 40px;
}

.wsa-archive-history h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

.wsa-history-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.wsa-case-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.wsa-case-number {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #cc3333;
}

.wsa-arrow {
    color: #cc3333;
    font-weight: normal;
}

.wsa-case-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wsa-status.shipped {
    color: #28a745;
    font-weight: 600;
}

.wsa-status.ready {
    color: #ffc107;
    font-weight: 600;
}

.wsa-status.building {
    color: #6c757d;
    font-weight: 600;
}

.wsa-ship-date {
    font-size: 12px;
    color: #666;
}

/* Case Contents */
.wsa-case-contents,
.wsa-case-contents-preview {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
    border-radius: 8px;
}

.wsa-case-contents-preview {
    border-top: none;
    border: 1px solid #e0e0e0;
}

.wsa-case-contents-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.wsa-case-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wsa-case-item:last-child {
    border-bottom: none;
}

.wsa-wine-qty {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.wsa-wine-name {
    color: #333;
}

/* Modal */
.wsa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsa-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.wsa-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    
    .wsa-bottle-display {
        gap: 4px;
    }
    
    .wsa-bottle {
        font-size: 24px;
    }
    
    .wsa-case-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wsa-case-meta {
        flex-direction: column;
        gap: 5px;
    }
}
.wsa-icepack-option {
    border: 2px solid #2196f3 !important;
    background: #e3f2fd !important;
    border-radius: 8px;
}
 .wsa-icepack-option input[type="number"] {
    border: 1px solid #90caf9;
    padding: 6px 8px;
    border-radius: 4px;
 }
