/* ==========================================
   Book Search Request Form - Styles
   Matching Flatsome theme & reference design
   ========================================== */

/* Container */
.bsr-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px 40px;
    font-family: inherit;
}

/* ---- Intro Section ---- */
.bsr-intro {
    margin-bottom: 30px;
}

.bsr-intro-heading {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px;
}

.bsr-intro-columns {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.bsr-intro-col {
    flex: 1;
}

.bsr-intro-col p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin: 0 0 12px;
}

.bsr-intro-col p:last-child {
    margin-bottom: 0;
}

.bsr-intro-notice {
    background: #f5f5f5;
    border-left: 4px solid #2d4a7a;
    padding: 18px 22px;
    border-radius: 0 4px 4px 0;
}

.bsr-intro-notice h4 {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
    letter-spacing: 0.3px;
}

.bsr-intro-notice p {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

@media (max-width: 600px) {
    .bsr-intro-columns {
        flex-direction: column;
        gap: 0;
    }

    .bsr-intro-heading {
        font-size: 22px;
    }
}

/* ---- Search Section ---- */
.bsr-search-section {
    background: #2d4a7a;
    border-radius: 6px;
    padding: 25px 30px;
    margin-bottom: 40px;
}

.bsr-search-section .bsr-search-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0 0 5px;
    text-transform: uppercase;
    border-bottom-color: rgba(255,255,255,0.4);
}

.bsr-search-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin: 0 0 15px;
}

.bsr-search-bar {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.bsr-search-bar input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s;
    height: 42px;
    box-sizing: border-box;
}

.bsr-search-bar input:focus {
    border-color: #222;
}

.bsr-btn-search {
    padding: 0 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    height: 42px;
    width: 42px;
    flex-shrink: 0;
}

.bsr-btn-search:hover {
    background: #555;
    border-color: #555;
}

/* ---- Form Section ---- */
.bsr-form-section {
    margin-top: 10px;
}

.bsr-form-heading {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 25px;
    letter-spacing: 0.3px;
}

/* Section titles */
.bsr-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #222;
}

/* Form rows */
.bsr-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
}

.bsr-row-full {
    display: block;
}

.bsr-col {
    flex: 1;
    min-width: 0;
}

/* Labels */
.bsr-container label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.bsr-required {
    color: #e74c3c;
}

/* Inputs */
.bsr-container input[type="text"],
.bsr-container input[type="email"],
.bsr-container input[type="tel"],
.bsr-container select,
.bsr-container textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.bsr-container input:focus,
.bsr-container select:focus,
.bsr-container textarea:focus {
    border-color: #2d4a7a;
    box-shadow: 0 0 0 3px rgba(45, 74, 122, 0.15);
    outline: none;
}

.bsr-container textarea {
    resize: vertical;
    min-height: 80px;
}

.bsr-container select {
    appearance: auto;
    cursor: pointer;
}

/* ---- Personal section spacing ---- */
.bsr-personal-section {
    margin-bottom: 35px;
}

/* ---- Book Entry ---- */
.bsr-book-entry {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.bsr-book-entry + .bsr-book-entry {
    padding-top: 15px;
}

.bsr-book-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Remove book button */
.bsr-remove-book {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.bsr-remove-book:hover {
    background: #fde8e8;
}

/* ---- File Upload Area ---- */
.bsr-upload-area {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bsr-upload-area:hover {
    border-color: #2d4a7a;
    background: #f0f4f9;
}

.bsr-upload-area.bsr-drag-over {
    border-color: #2d4a7a;
    background: #e8eef5;
}

.bsr-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.bsr-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #888;
    pointer-events: none;
}

.bsr-upload-placeholder svg {
    opacity: 0.5;
}

.bsr-upload-placeholder span {
    font-size: 13px;
}

/* File preview */
.bsr-file-preview {
    position: relative;
    display: inline-block;
}

.bsr-file-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.bsr-remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: background 0.2s;
}

.bsr-remove-file:hover {
    background: #c0392b;
}

/* ---- Add Book Link ---- */
.bsr-add-book-row {
    text-align: right;
    margin: 10px 0 30px;
}

.bsr-add-book-link {
    color: #222;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.bsr-add-book-link:hover {
    color: #2d4a7a;
}

/* ---- Privacy & Submit ---- */
.bsr-submit-section {
    text-align: center;
    padding-top: 10px;
}

.bsr-privacy-note {
    margin-bottom: 20px;
    text-align: left;
}

.bsr-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px !important;
    color: #555 !important;
    font-weight: 400 !important;
    cursor: pointer;
    line-height: 1.5;
}

.bsr-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-top: 3px;
    flex-shrink: 0;
}

.bsr-checkbox-label a {
    color: #222;
    text-decoration: underline;
}

.bsr-btn-submit {
    display: inline-block;
    padding: 14px 60px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #222;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.1s;
}

.bsr-btn-submit:hover {
    background: #444;
}

.bsr-btn-submit:active {
    transform: scale(0.98);
}

.bsr-btn-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Loading spinner on button */
.bsr-btn-submit.bsr-loading {
    position: relative;
    color: transparent;
}

.bsr-btn-submit.bsr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bsr-spin 0.6s linear infinite;
}

@keyframes bsr-spin {
    to { transform: rotate(360deg); }
}

/* Form messages */
.bsr-form-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.bsr-form-message.bsr-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bsr-form-message.bsr-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---- Field validation ---- */
.bsr-container input.bsr-invalid,
.bsr-container select.bsr-invalid,
.bsr-container textarea.bsr-invalid {
    border-color: #e74c3c;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .bsr-row {
        flex-direction: column;
        gap: 12px;
    }

    .bsr-search-section {
        padding: 20px;
    }

    .bsr-container {
        padding: 0 10px 30px;
    }

    .bsr-btn-submit {
        width: 100%;
        padding: 14px 20px;
    }

    .bsr-form-heading {
        font-size: 18px;
    }
}
