/**
 * Spik N Span Quote Generator - Frontend Styles
 * Version: 2.6.0
 */

#sns-quote-app {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #2d2d2d;
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    line-height: 1.5;
}
#sns-quote-app * { box-sizing: border-box; }

.sns-header { padding: 30px 30px 10px 30px; }
.sns-header h2 { margin: 0 0 5px 0; color: #1a1a1a; font-size: 28px; font-weight: 700; }
.sns-header p { margin: 0; color: #666; font-size: 16px; }

.sns-section { padding: 20px 30px; border-bottom: 1px solid #eee; transition: all 0.3s ease; }
.sns-section-title { display: flex; align-items: center; font-size: 20px; font-weight: 700; color: #1a73e8; margin-bottom: 20px; }
.sns-section-icon { width: 28px; height: 28px; background: #e83e8c; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-right: 12px; }
.sns-section-title svg { width: 24px; height: 24px; margin-right: 8px; }

/* --- GATED SECTIONS --- */
.sns-gated-section.sns-disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
    user-select: none;
}

/* --- ROOMS GRID (Tight Padding & Centered) --- */
.sns-grid-rooms { 
    display: grid; 
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap: 15px; 
}
.sns-room-card { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 4px; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding-top: 2px; 
    padding-bottom: 2px; 
    padding-left: 12px;
    padding-right: 12px;
    background: #fff;
    min-width: 0; 
    position: relative; 
}
.sns-room-title { 
    font-size: 13px; 
    font-weight: 600; 
    color: #333; 
    line-height: 1.2;
    text-align: center;
    width: 100%;
    margin: 0;
}

.sns-room-controls {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; 
    width: 100%;
}

.sns-room-icon {
    position: absolute; 
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sns-room-icon svg {
    width: 100%;
    height: 100%;
}

/* --- COMPACT QUANTITY INPUTS --- */
.sns-qty-wrapper { 
    display: flex; 
    align-items: center; 
    background: #f4f8ff; 
    border: 1px solid #e0ecff; 
    border-radius: 6px; 
    padding: 2px;
    width: 100%;
    max-width: 110px; 
    margin: 0 auto; 
}
.sns-qty-btn { 
    background: transparent; 
    border: none; 
    width: 22px; 
    height: 22px; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: 600;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #1a73e8; 
    padding: 0;
    border-radius: 4px;
    flex-shrink: 0;
}
.sns-qty-btn:hover { background: #e0ecff; }
.sns-qty-input { 
    flex-grow: 1; 
    width: 0; 
    min-width: 20px;
    text-align: center; 
    border: 1px solid #e0ecff; 
    background: #fff; 
    border-radius: 4px;
    margin: 0 2px;
    font-size: 13px; 
    font-weight: 600; 
    color: #333;
    padding: 2px 0;
    -moz-appearance: textfield; 
}
.sns-qty-input::-webkit-outer-spin-button, .sns-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --- COMPACT ADD-ONS STYLES --- */
.sns-addons-compact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sns-addon-compact-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #fafafa;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 6px;
}

.sns-addon-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
    flex-grow: 1;
}

.sns-addon-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #1a73e8;
    cursor: pointer;
    flex-shrink: 0;
}

.sns-addon-icon-wrapper {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.sns-addon-icon-wrapper svg {
    width: 20px;
    height: 20px;
}

/* Dynamic Quantity Box for Addons */
.sns-addon-qty-container {
    display: none; 
    align-items: center;
    gap: 8px;
    background: #eef4fd;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #cce0fc;
    width: 100%; 
    margin-top: 5px;
}

.sns-addon-qty-container label {
    font-size: 12px;
    color: #1a73e8;
    margin: 0;
    font-weight: 600;
}

.sns-addon-qty-input {
    width: 45px;
    padding: 3px;
    border: 1px solid #a4c8f8;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

/* --- FREQUENCY SELECTOR (Uniform Height) --- */
.sns-freq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.sns-freq-option { position: relative; cursor: pointer; height: 100%; }
.sns-freq-option input[type="radio"] { position: absolute; opacity: 0; cursor: pointer; }
.sns-freq-content { 
    border: 1px solid #e0e0e0; 
    border-radius: 6px; 
    padding: 15px; 
    text-align: center; 
    transition: all 0.2s ease; 
    height: 100%;
    min-height: 110px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.sns-freq-option input:checked ~ .sns-freq-content { border-color: #1a73e8; background: #f4f8ff; box-shadow: 0 0 0 1px #1a73e8; }
.sns-freq-title { font-weight: 600; font-size: 15px; color: #333; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; flex-direction: column;}
.sns-discount-badge { background: #4caf50; color: white; font-size: 11px; padding: 2px 6px; border-radius: 10px; margin-top: 5px; font-weight: 700; }
.sns-freq-desc { font-size: 12px; color: #777; }

/* Sticky Bottom Bar */
.sns-footer { display: flex; justify-content: space-between; align-items: center; background: #1a73e8; padding: 20px 30px; color: white; }
.sns-total-box { display: flex; flex-direction: column; }
.sns-total-label { font-size: 14px; opacity: 0.9; margin-bottom: 5px; }
.sns-total-price { font-size: 32px; font-weight: 800; line-height: 1; display: flex; align-items: baseline; }
.sns-currency-label { font-size: 18px; margin-right: 5px; font-weight: 600; }

.sns-book-btn { background: #e83e8c; color: white; border: none; padding: 15px 30px; font-size: 18px; font-weight: 700; border-radius: 6px; cursor: pointer; transition: background 0.3s; display: flex; align-items: center; }
.sns-book-btn svg { margin-right: 10px; width: 20px; height: 20px; }
.sns-book-btn:hover:not(:disabled) { background: #d12e79; }
.sns-book-btn:disabled { background: #9e9e9e; cursor: not-allowed; opacity: 0.7; }

/* --- QUOTE SUMMARY SECTION --- */
.sns-summary-section {
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px dashed #ccc;
}
.sns-summary-section h3 { margin: 0 0 10px 0; font-size: 18px; color: #333; }
#sns-quote-text {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    color: #333;
    resize: vertical;
    margin-bottom: 10px;
}
.sns-copy-btn {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}
.sns-copy-btn:hover { background: #555; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sns-grid-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sns-addons-compact-list { grid-template-columns: minmax(0, 1fr); }
    .sns-freq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sns-footer { flex-direction: column; align-items: stretch; text-align: center; gap: 15px; }
    .sns-total-price { justify-content: center; }
    .sns-book-btn { justify-content: center; width: 100%; }
}
@media (max-width: 480px) {
    .sns-grid-rooms { grid-template-columns: minmax(0, 1fr); }
    .sns-freq-grid { grid-template-columns: minmax(0, 1fr); }
    .sns-section { padding: 15px; }
}