/**
 * G Plan-Style Sample Request System Styles
 * Companion stylesheet for brochure-product.css
 */

/* Config Section */
.cfc-bp__config-section { margin: 2.5rem 0; padding: 2rem; background: #f9fafb; border-radius: 12px; }
.cfc-bp__config-row { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; background: white; border-bottom: 1px solid #e5e7eb; }
.cfc-bp__config-row:first-child { border-radius: 8px 8px 0 0; }
.cfc-bp__config-row:last-of-type { border-radius: 0 0 8px 8px; border-bottom: none; }
.cfc-bp__config-label { flex-shrink: 0; width: 140px; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.5px; }
.cfc-bp__config-value { flex: 1; padding: 0 1rem; }
.cfc-bp__config-placeholder { color: #9ca3af; font-size: 0.875rem; }
.cfc-bp__config-selected { color: #111827; font-weight: 500; }
.cfc-bp__config-change { flex-shrink: 0; padding: 0.75rem 2rem; background: white; border: 2px solid #c9a962; color: #1a1a2e; font-weight: 600; font-size: 0.875rem; letter-spacing: 1px; border-radius: 4px; cursor: pointer; transition: all 0.2s; text-transform: uppercase; }
.cfc-bp__config-change:hover { background: #c9a962; color: white; box-shadow: 0 2px 8px rgba(201, 169, 98, 0.3); }

/* Action Buttons */
.cfc-bp__actions { display: flex; gap: 0.75rem; margin: 1.5rem 0; }
.cfc-bp__action-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.25rem; background: white; border: 1px solid #d1d5db; border-radius: 8px; color: #374151; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.cfc-bp__action-btn:hover { border-color: #c9a962; color: #c9a962; background: #f9fafb; }
.cfc-bp__action-btn svg { flex-shrink: 0; }

/* Sample Basket */
.cfc-bp__sample-basket { margin: 2rem 0; padding: 1.5rem; background: white; border: 1px solid #e5e7eb; border-radius: 8px; }
.cfc-bp__sample-basket-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.cfc-bp__sample-basket-header h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0.5px; margin: 0; }
.cfc-bp__sample-count { font-size: 0.875rem; font-weight: 500; color: #6b7280; }
.cfc-bp__sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cfc-bp__sample-slot { position: relative; aspect-ratio: 1; border: 2px dashed #d1d5db; border-radius: 8px; min-height: 80px; display: flex; align-items: center; justify-content: center; background: #f9fafb; }
.cfc-bp__sample-slot.is-filled { border-style: solid; border-color: #c9a962; background: white; }
.cfc-bp__sample-swatch { width: 100%; height: 100%; border-radius: 6px; }
.cfc-bp__sample-remove { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #d1d5db; border-radius: 50%; color: #374151; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: all 0.2s; }
.cfc-bp__sample-remove:hover { background: #ef4444; border-color: #ef4444; color: white; transform: scale(1.1); }

/* Size Modal */
.cfc-modal--size .cfc-modal__dialog { max-width: 700px; }
.cfc-size-modal__title { font-size: 1.125rem; font-weight: 600; margin-bottom: 1.5rem; letter-spacing: 0.5px; }
.cfc-size-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.cfc-size-card { position: relative; padding: 2rem 1.5rem; background: white; border: 2px solid #e5e7eb; border-radius: 12px; cursor: pointer; transition: all 0.2s; text-align: center; }
.cfc-size-card:hover { border-color: #c9a962; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.cfc-size-card.is-selected { border-color: #c9a962; background: rgba(201, 169, 98, 0.05); }
.cfc-size-card__check { position: absolute; top: 1rem; right: 1rem; width: 28px; height: 28px; display: none; align-items: center; justify-content: center; background: #c9a962; color: white; border-radius: 50%; }
.cfc-size-card.is-selected .cfc-size-card__check { display: flex; }
.cfc-size-card__icon { margin: 0 auto 1rem; color: #9ca3af; }
.cfc-size-card__name { font-size: 1.125rem; font-weight: 600; color: #111827; margin-bottom: 0.75rem; }
.cfc-size-card__dims { display: flex; gap: 1rem; justify-content: center; font-size: 0.875rem; color: #6b7280; }

/* Fabric Modal */
.cfc-modal--fabric { z-index: 999999 !important; }
.cfc-modal--fabric .cfc-modal__backdrop { z-index: 999998 !important; }
.cfc-modal--fabric .cfc-modal__dialog { max-width: 95vw; max-height: 90vh; width: 1400px; z-index: 999999 !important; }
.cfc-fabric-modal__body { display: flex; gap: 2rem; height: 70vh; min-height: 600px; }
.cfc-fabric-browser { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.cfc-fabric-tabs { display: flex; gap: 1px; background: #e5e7eb; border-radius: 8px 8px 0 0; overflow: hidden; }
.cfc-fabric-tab { flex: 1; padding: 1rem; background: #f3f4f6; border: none; color: #374151; font-weight: 600; font-size: 0.875rem; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s; }
.cfc-fabric-tab:hover { background: #e5e7eb; }
.cfc-fabric-tab.active { background: white; color: #1a1a2e; }
.cfc-fabric-search { position: relative; padding: 1.5rem; background: white; border-bottom: 1px solid #e5e7eb; }
.cfc-fabric-search__input { width: 100%; padding: 0.75rem 2.5rem 0.75rem 1rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.938rem; }
.cfc-fabric-search svg { position: absolute; right: 2.25rem; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.cfc-fabric-content { flex: 1; overflow-y: auto; padding: 2rem; background: white; }
.cfc-fabric-section { margin-bottom: 3rem; }
.cfc-fabric-section h4 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; letter-spacing: 0.5px; }
.cfc-fabric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 1rem; }
.cfc-fabric-swatch { position: relative; aspect-ratio: 1; padding: 0; border: 2px solid #e5e7eb; border-radius: 8px; background: white; cursor: pointer; overflow: hidden; transition: all 0.2s; }
.cfc-fabric-swatch:hover { border-color: #c9a962; transform: scale(1.05); box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 1; }
.cfc-fabric-swatch__color { display: block; width: 100%; height: 100%; }

/* Fabric Sidebar */
.cfc-fabric-sidebar { flex-shrink: 0; width: 320px; display: flex; flex-direction: column; gap: 1.5rem; }
.cfc-fabric-sidebar__basket { flex: 1; padding: 1.5rem; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; overflow-y: auto; }
.cfc-fabric-sidebar__basket h4 { font-size: 0.938rem; font-weight: 600; margin-bottom: 1.25rem; letter-spacing: 0.5px; }
.cfc-fabric-sidebar__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; min-height: 180px; }
.cfc-fabric-sidebar__sample { position: relative; aspect-ratio: 1; }
.cfc-fabric-sidebar__sample--empty { border: 2px dashed #d1d5db; border-radius: 6px; background: #f9fafb; }
.cfc-fabric-sidebar__sample--filled { border: 2px solid #c9a962; border-radius: 6px; background: white; }
.cfc-fabric-sidebar__swatch { width: 100%; height: 100%; border-radius: 4px; }
.cfc-fabric-sidebar__remove { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #d1d5db; border-radius: 50%; color: #374151; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: all 0.2s; }
.cfc-fabric-sidebar__remove:hover { background: #ef4444; border-color: #ef4444; color: white; transform: scale(1.15); }
#confirmFabricBtn { position: sticky; bottom: 0; z-index: 5; }

/* Fabric Detail */
.cfc-fabric-detail { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: white; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 3rem; }
.cfc-fabric-detail__back { position: absolute; top: 2rem; left: 2rem; display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.75rem; background: white; border: 2px solid #1a1a2e; border-radius: 8px; color: #1a1a2e; font-weight: 600; font-size: 0.938rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 20; }
.cfc-fabric-detail__back:hover { background: #1a1a2e; color: white; transform: translateX(-4px); }
.cfc-fabric-detail__back::before { content: '←'; font-size: 1.25rem; font-weight: bold; }
.cfc-fabric-detail__content { display: flex; gap: 3rem; align-items: center; max-width: 800px; }
.cfc-fabric-detail__preview { flex-shrink: 0; }
.cfc-fabric-detail__info h3 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.cfc-fabric-detail__ref { font-size: 0.938rem; font-weight: 600; color: #6b7280; margin-bottom: 0.75rem; }
.cfc-fabric-detail__composition { font-size: 0.938rem; color: #374151; margin-bottom: 2rem; }
.cfc-fabric-detail__badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: white; color: #1a1a2e; border-radius: 50%; font-size: 0.75rem; font-weight: 600; margin-right: 0.5rem; }

/* Sample Form */
.cfc-modal--sample-form .cfc-modal__dialog { max-width: 600px; }
.cfc-sample-form__samples { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #e5e7eb; }
.cfc-sample-form__sample { position: relative; width: 80px; height: 80px; }
.cfc-sample-form__swatch { width: 100%; height: 100%; border: 2px solid #d1d5db; border-radius: 8px; }
.cfc-sample-form__remove { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #d1d5db; border-radius: 50%; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.cfc-sample-form__remove:hover { background: #ef4444; border-color: #ef4444; color: white; }
.cfc-sample-form { display: flex; flex-direction: column; gap: 1.25rem; }
.cfc-form-row { display: flex; gap: 1rem; }
.cfc-form-row--2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cfc-form-field { flex: 1; display: flex; flex-direction: column; }
.cfc-form-field--small { max-width: 200px; }
.cfc-form-field label { font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 0.5rem; }
.cfc-form-field input, .cfc-form-field select { padding: 0.75rem 1rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.938rem; }
.cfc-form-field input:focus, .cfc-form-field select:focus { outline: none; border-color: #1a1a2e; box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.1); }
.cfc-form-checkbox { display: flex; gap: 0.75rem; align-items: flex-start; }
.cfc-form-checkbox input[type="checkbox"] { flex-shrink: 0; margin-top: 0.25rem; }
.cfc-form-checkbox label { font-size: 0.875rem; color: #374151; line-height: 1.5; }
.cfc-form-checkbox a { color: #c9a962; text-decoration: underline; }
.cfc-form-submit { margin-top: 1rem; }
.cfc-form-recaptcha { margin-top: 1rem; font-size: 0.75rem; color: #6b7280; text-align: center; }
.cfc-form-recaptcha a { color: #c9a962; text-decoration: underline; }

/* Buttons */
.cfc-btn { padding: 0.75rem 2rem; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.cfc-btn--primary { background: #c9a962; color: white; }
.cfc-btn--primary:hover { background: #b8954e; }
.cfc-btn--primary:disabled { background: #d1d5db; cursor: not-allowed; }
.cfc-btn--block { width: 100%; }
.cfc-btn--large { padding: 1rem 2.5rem; font-size: 1.063rem; }

/* Responsive */
@media (max-width: 768px) {
    .cfc-bp__sample-grid { grid-template-columns: repeat(3, 1fr); }
    .cfc-size-grid { grid-template-columns: 1fr; }
    .cfc-fabric-modal__body { flex-direction: column; }
    .cfc-fabric-sidebar { width: 100%; }
    .cfc-fabric-detail__content { flex-direction: column; text-align: center; }
    .cfc-form-row--2col { grid-template-columns: 1fr; }
}
