/**
 * Soch Wale Core Frontend Styles
 * White & Black Minimalist Aesthetic (#FFFFFF / #111111)
 */

/* Modal Backdrop & Container */
.sw-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sw-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.sw-modal-box {
    background: #ffffff;
    color: #111111;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.sw-modal-backdrop.active .sw-modal-box {
    transform: translateY(0);
}

.sw-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #111111;
}

.sw-modal-close:hover {
    background: #e5e5e5;
}

.sw-modal-content {
    padding: 30px;
}

.sw-modal-header {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.sw-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111111;
}

/* Book Summary in Checkout */
.sw-checkout-book-summary {
    display: flex;
    gap: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.sw-checkout-thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.sw-checkout-details h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 700;
}

.sw-checkout-price {
    font-size: 18px;
    font-weight: 800;
    color: #111111;
}

/* Forms */
.sw-form-group {
    margin-bottom: 15px;
}

.sw-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #111111;
}

.sw-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 14px;
    color: #111111;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sw-form-input:focus {
    border-color: #111111;
    outline: none;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.1);
}

/* JazzCash Payment Box */
.sw-jazzcash-box {
    background: #fdfdfd;
    border: 2px dashed #111111;
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    text-align: center;
}

.sw-jazzcash-brand {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: #c62828;
    margin-bottom: 4px;
}

.sw-jazzcash-acc {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin: 4px 0;
    color: #111111;
}

.sw-jazzcash-holder {
    font-size: 14px;
    color: #555555;
    margin-bottom: 12px;
}

.sw-btn-copy {
    background: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.sw-btn-copy:hover {
    background: #111111;
    color: #ffffff;
}

/* Buttons */
.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.sw-btn-primary {
    background: #111111;
    color: #ffffff !important;
}

.sw-btn-primary:hover {
    background: #333333;
}

.sw-btn-secondary {
    background: #ffffff;
    color: #111111 !important;
    border-color: #cccccc;
}

.sw-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #111111;
}

.sw-btn-whatsapp {
    background: #25D366;
    color: #ffffff !important;
}

.sw-btn-whatsapp:hover {
    background: #1EBE5D;
}

.sw-btn-block {
    display: flex;
    width: 100%;
}

.sw-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Customer Account Area */
.sw-account-container {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.sw-account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.sw-account-avatar img {
    border-radius: 50%;
    border: 2px solid #111111;
}

.sw-account-user-meta h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.sw-account-user-meta p {
    margin: 4px 0 0 0;
    color: #666666;
    font-size: 14px;
}

.sw-account-actions {
    margin-left: auto;
}

.sw-account-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 25px;
}

.sw-tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #666666;
    transition: all 0.2s;
}

.sw-tab-btn.active {
    color: #111111;
    border-bottom-color: #111111;
}

/* Library Cards Grid */
.sw-books-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sw-library-card {
    display: flex;
    gap: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.2s ease;
}

.sw-library-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sw-library-thumb img {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.sw-library-details h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
}

.sw-badge-access {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 6px;
}

.sw-date-info {
    font-size: 12px;
    color: #777777;
    margin: 0 0 10px 0;
}

/* Orders Table */
.sw-orders-table-wrap {
    overflow-x: auto;
}

.sw-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sw-orders-table th, .sw-orders-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.sw-orders-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Guest Auth Tabs */
.sw-auth-wrap {
    max-width: 480px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.sw-auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 25px;
}

.sw-auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 5px;
    font-size: 13px;
    font-weight: 600;
    color: #777777;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.sw-auth-tab-btn.active {
    color: #111111;
    border-bottom-color: #111111;
}

.sw-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.sw-alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.sw-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
