/* Trading Products - Exchange */

/* Trade UI wrapper */
.tp-exchange-wrapper {
    margin-top: 12px;
}

.tp-exchange-btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px !important;
    background: #4054b2 !important;
    color: #fff !important;
    border-color: #4054b2 !important;
    transition: background .2s, border-color .2s;
}

.tp-exchange-btn:hover {
    background: #5566c4 !important;
    border-color: #5566c4 !important;
    color: #fff !important;
}

.tp-exchange-description {
    font-size: 16px;
    color: #000000;
    margin: 0 0 10px;
    text-align: center;
}

.tp-exchange-login-notice,
.tp-exchange-own-notice {
    margin: 0 0 8px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-left: 4px solid #ccc;
    font-size: 14px;
}

.tp-exchange-login-notice p,
.tp-exchange-own-notice p {
    margin-bottom: 0;
}

.tp-exchange-login-notice a {
    font-weight: 600;
    text-decoration: underline;
}

/* Overlay */
.tp-exchange-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.tp-exchange-modal {
    position: relative;
    background: #fff;
    border-radius: 6px;
    padding: 32px 36px 32px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.tp-exchange-modal h3 {
    margin: 0 0 4px;
    font-family: "Helvetica Neue", sans-serif !important;
    font-style: normal !important;
    font-weight: 600 !important;
    color: #000 !important;
    font-size: 30px !important;
    line-height: 36px !important;
}

.tp-exchange-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px;
}

/* Close button */
.tp-exchange-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}

.tp-exchange-close:hover {
    background: #222;
    color: #fff;
}

/* Notice */
.tp-exchange-notice {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.tp-exchange-notice.success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.tp-exchange-notice.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Fields */
.tp-exchange-field {
    margin-bottom: 18px;
}

.tp-exchange-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.tp-exchange-field label .required { color: #e00; }

.tp-exchange-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.tp-exchange-field textarea:focus {
    outline: none;
    border-color: #999;
}

/* Upload area */
.tp-image-upload-area {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    color: #888;
    font-size: 14px;
    transition: border-color .2s;
}

.tp-image-upload-area:hover {
    border-color: #888;
    color: #444;
}

.tp-image-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Previews */
.tp-image-previews {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tp-image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.tp-image-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.tp-remove-image {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e00;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

/* Submit */
.tp-exchange-submit {
    width: 100%;
    margin-top: 4px;
    font-size: 18px !important;
    border-radius: 0 !important;
    padding: 12px !important;
    font-weight: 500 !important;
    background: #F9BC04 !important;
    color: #000 !important;
    transition: background .2s, color .2s;
}

.tp-exchange-submit:hover {
    background: #000 !important;
    color: #fff !important;
}

.tp-exchange-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Product line */
.tp-exchange-product {
    font-size: 14px;
    color: #444;
    margin: 0 0 16px;
}

.tp-exchange-product strong {
    color: #111;
}

/* Section titles */
.tp-exchange-section-title {
    font-family: "Helvetica Neue", sans-serif !important;
    font-style: normal !important;
    font-weight: 700 !important;
    color: #000 !important;
    font-size: 19px !important;
    line-height: 26px !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
    margin: 20px 0 14px;
}

/* Two-column row */
.tp-exchange-row {
    display: flex;
    gap: 12px;
}

.tp-exchange-row .tp-exchange-field {
    flex: 1;
}

/* Inputs */
.tp-exchange-field input[type="text"],
.tp-exchange-field input[type="email"],
.tp-exchange-field input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.tp-exchange-field input:focus {
    outline: none;
    border-color: #999;
}

/* Terms checkbox */
.tp-exchange-terms .tp-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    font-weight: normal;
    cursor: pointer;
}

.tp-exchange-terms input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.tp-exchange-terms a {
    color: inherit;
    text-decoration: underline;
}

/* Success screen */
.tp-exchange-success {
    text-align: center;
    padding: 60px 20px;
}

.tp-success-icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 12px;
}

.tp-exchange-success h4 {
    font-size: 22px;
    margin: 0 0 8px;
    color: #111;
}

.tp-exchange-success p {
    font-size: 15px;
    color: #555;
    margin: 0;
}

/* Trade accept info block */
.tp-trade-accept-info {
    background: #f5e7bb;
    border-left: 4px solid #F9BC04;
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.tp-trade-accept-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #000000;
}

.tp-trade-accept-text {
    margin: 0;
    font-size: 14px;
    color: #3d2f1a;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .tp-exchange-modal h3 {
        font-size: 25px !important;
    }

    .tp-exchange-modal {
        max-width: 100%;
        margin: 0 12px;
        padding: 24px 20px 20px;
    }

    .tp-exchange-row {
        flex-direction: column;
        gap: 0;
    }

    .tp-exchange-section-title {
        font-size: 14px;
    }
}
