/* Watch Lounge - Sell Watch Styles */

.wl-sell-watch {
    /* Inherit WooCommerce My Account content width */
}

.wl-sell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.wl-sell-header h2 {
    margin: 0;
    font-size: 1.625rem;
}

.wl-sell-header a:not(.button) {
    color: inherit;
    text-decoration: none;
}

.wl-sell-header a:not(.button):hover {
    text-decoration: underline;
}

.wl-sell-intro {
    margin-bottom: 2rem;
}

.wl-sell-intro p {
    margin: 0;
    color: #666;
}

/* Empty state */
.wl-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px solid var(--global--color-border, #e0e0e0);
}

.wl-empty-state p {
    margin: 0 0 0.625rem;
}

.wl-empty-state p:last-child {
    margin-bottom: 0;
    color: #666;
}

/* Request list - uses WooCommerce shop_table styling */
.wl-requests-table.shop_table {
    width: 100%;
    font-size: 0.875rem;
}

.wl-requests-table.shop_table thead th {
    font-weight: 600;
    background: transparent;
    padding: 0 10px 20px 10px;
    border: none;
}

.wl-requests-table.shop_table thead tr:first-child th:first-child {
    padding-left: 0;
}

.wl-requests-table.shop_table thead tr:first-child th:last-child {
    padding-right: 0;
    text-align: end;
}

.wl-requests-table.shop_table tbody td {
    padding: 20px 10px;
    border-top: 1px solid var(--global--color-border, #e0e0e0);
    border-bottom: none;
    vertical-align: middle;
}

.wl-requests-table.shop_table tbody tr:last-child td {
    border-bottom: 1px solid var(--global--color-border, #e0e0e0);
}

.wl-requests-table.shop_table tbody td:first-child {
    padding-left: 0;
}

.wl-requests-table.shop_table tbody td:last-child {
    padding-right: 0;
    text-align: end;
}

.wl-requests-table .wl-watch-info strong {
    display: block;
}

.wl-requests-table .wl-watch-info small {
    color: #666;
    font-size: 0.813rem;
}

/* Status badge */
.wl-status {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Buttons - match WooCommerce account buttons */
.wl-requests-table .button,
.wl-sell-watch .button {
    font-size: 0.875rem;
    height: auto;
    min-height: 1.875rem;
    padding: 0 0.875rem;
}

.wl-sell-header .button {
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    min-height: auto;
}

/* Form styles */
.wl-sell-form {
    margin-top: 1.5rem;
}

.wl-form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--global--color-border, #e0e0e0);
}

.wl-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

.wl-form-section h3 {
    margin: 0 0 1.25rem;
    font-size: 1.125rem;
}

.wl-form-row {
    margin-bottom: 1.25rem;
}

.wl-form-row:last-child {
    margin-bottom: 0;
}

.wl-form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.wl-form-row label .required {
    color: #c00;
}

.wl-form-row input[type="text"],
.wl-form-row input[type="number"],
.wl-form-row input[type="tel"],
.wl-form-row select,
.wl-form-row textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--global--color-border, #e0e0e0);
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}

.wl-form-row input:focus,
.wl-form-row select:focus,
.wl-form-row textarea:focus {
    outline: none;
    border-color: var(--global--color-font, #000);
}

.wl-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.wl-form-row-half {
    display: flex;
    gap: 1.25rem;
}

.wl-form-row-half > div {
    flex: 1;
}

.wl-form-hint {
    font-size: 0.813rem;
    color: #666;
    margin-top: 0.375rem;
}

/* Photo upload */
.wl-photo-upload {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wl-photos-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.wl-photo-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.wl-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wl-photo-item .wl-photo-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    padding: 0;
}

.wl-photo-item .wl-photo-remove:hover {
    background: #333;
}

.wl-photo-item.uploading {
    opacity: 0.5;
}

.wl-photo-item.uploading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wl-spin 0.8s linear infinite;
}

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

/* Form submit */
.wl-form-submit {
    margin-top: 2rem;
}

.wl-form-submit .button {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.wl-form-message {
    margin-top: 1.25rem;
    padding: 1rem;
}

.wl-form-message.success {
    background: #d4edda;
    color: #155724;
}

.wl-form-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Single request view */
.wl-request-detail {
    margin-top: 1.5rem;
}

.wl-status-banner {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: #fff;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 2rem;
}

.wl-offer-box {
    padding: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    border: 2px solid var(--global--color-font, #000);
}

.wl-offer-box h3 {
    margin: 0 0 0.625rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.wl-offer-amount {
    font-size: 2.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.wl-offer-message {
    margin-bottom: 1rem;
    font-style: italic;
    color: #666;
}

.wl-offer-date {
    font-size: 0.813rem;
    color: #666;
    margin-bottom: 1rem;
}

.wl-offer-cta {
    font-size: 0.875rem;
    margin: 0;
}

/* Request info - clean design matching WooCommerce */
.wl-request-info {
    margin-bottom: 2.5rem;
}

.wl-request-info h3 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.wl-request-info table {
    width: 100%;
    border: none;
    border-collapse: collapse;
}

.wl-request-info th,
.wl-request-info td {
    padding: 0.75rem 0;
    border: none;
    border-bottom: 1px solid var(--global--color-border, #e0e0e0);
    text-align: left;
    vertical-align: top;
}

.wl-request-info tr:first-child th,
.wl-request-info tr:first-child td {
    padding-top: 0;
}

.wl-request-info tr:last-child th,
.wl-request-info tr:last-child td {
    border-bottom: none;
}

.wl-request-info th {
    width: 180px;
    font-weight: 400;
    color: #666;
    padding-right: 1rem;
}

.wl-request-info td {
    font-weight: 400;
}

/* Photos grid */
.wl-request-photos {
    margin-bottom: 2rem;
}

.wl-request-photos h3 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.wl-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.wl-photos-grid a {
    display: block;
}

.wl-photos-grid img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    transition: opacity 0.2s;
}

.wl-photos-grid a:hover img {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .wl-form-row-half {
        flex-direction: column;
        gap: 1.25rem;
    }

    .wl-requests-table.shop_table {
        font-size: 0.813rem;
    }

    .wl-requests-table.shop_table thead th,
    .wl-requests-table.shop_table tbody td {
        padding: 15px 8px;
    }

    .wl-offer-amount {
        font-size: 1.75rem;
    }

    .wl-request-info th {
        width: 120px;
    }
}

@media (max-width: 600px) {
    .wl-sell-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wl-sell-header .button {
        width: 100%;
        text-align: center;
    }

    /* Hide some columns on mobile */
    .wl-requests-table.shop_table th.wl-col-price,
    .wl-requests-table.shop_table td.wl-col-price,
    .wl-requests-table.shop_table th.wl-col-offer,
    .wl-requests-table.shop_table td.wl-col-offer {
        display: none;
    }
}

/* Accept offer button */
.wl-offer-actions {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.wl-accept-btn {
    padding: 0.875rem 2rem \!important;
    font-size: 1rem \!important;
    min-height: auto \!important;
}

.wl-offer-note {
    font-size: 0.813rem;
    color: #666;
    margin: 0;
}

.wl-offer-accepted {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
}

.wl-offer-accepted p {
    margin: 0;
    font-weight: 500;
}
