/**
 * Reseller Products Page Styles
 * Usage: Enqueued on template-reseller-products.php
 */

/* Main Section Wrapper */

/* Main Section Wrapper */
.reseller-products-section {
    padding: 60px 0;
    min-height: 80vh;
    background-color: #fff;
}

.rp-company-brand .rp-company-name {
    font-family: Montserrat;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
}

.rp-company-brand .rp-comapny-contain {
    text-align: center;
    margin-bottom: 25px;
}
.rp-company-brand .rp-comapny-contain .rp-company-logo{
    position: relative;
    width: fit-content;
    margin: 0 auto;
}
.rp-company-brand .rp-comapny-contain .rp-company-logo .edit-pimage{
    position: absolute;
    right: -20px;
    top: -10px;
    width: 26px;
    height: 26px;
    background: #0081cc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}
.rp-company-brand .rp-comapny-contain .rp-company-logo:hover .edit-pimage{
/*     opacity: 1; */
}
.rp-company-brand .rp-comapny-contain .rp-company-logo img {
    max-width: 180px;
}

/* Header Area */
.rp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
    gap: 15px;
}

.rp-header .rp-title-area {
    display: flex;
    flex-direction: column;
}

.rp-header h1.rp-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #252525;
    margin: 0;
    line-height: 1.3;
}

.rp-actions {
    display: flex;
    gap: 12px;
}

.rp-actions .count-products {
background: #4d5656;
    padding: 12px 20px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid Layout */
.rp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* Product Card */
.rp-card {
    background: #fff;
    border: 1px solid #E0E6EB;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.2s ease;
}

.rp-card:hover {
    transform: translateY(-2px);
}

.rp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.rp-product-title {
    font-family: Open Sans !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    color: #252525 !important;
    line-height: 1.5 !important;
}

.rp-view-product-link {
    font-size: 13px;
    color: #0081CC !important;
    /* Safiery Blue */
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
}

.rp-view-product-link:hover {
    text-decoration: underline;
}

.rp-input-group label {
    display: block;
    margin-bottom: 14px;
    color: #252525;
    font-family: Open Sans;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
}

.rp-input-group input[type="text"],
.rp-input-group input[type="url"],
.rp-form-group input[type="file"] {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid #0081CC;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #fcfcfc;
    line-height: 1.3;
}

.rp-input-group input:focus {
    border-color: #0073aa;
    background-color: #fff;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.2);
}

/* Buttons */
.rp-btn {
    font-family: Open Sans;
    font-weight: 600;
    font-size: 14px !important;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background: #0081CC;
    cursor: pointer;
    padding: 12px 32px;
    border-radius: 10px !important;
}

.rp-btn-primary {
    font-size: 14px !important;
    background-color: #0081CC !important;
    color: #fff !important;
    border-color: #0081CC;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    padding: 12px 32px;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

.rp-btn-primary:hover {
    border-color: #0abd9c;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.rp-btn-outline {
    background-color: transparent !important;
    color: #0081CC !important;
    border: 1px solid #0081CC;
}
.rp-btn-outline:focus,
.rp-btn-outline:hover {
    background-color: #0081CC !important;
    color: #fff !important;
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.rp-btn-lg {
    padding: 12px 36px;
    font-size: 15px;
}

/* Footer Area */
.rp-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Responsive - Mobile */
@media screen and (max-width: 767px) {
    .rp-company-brand .rp-comapny-contain .rp-company-logo{
        width: auto;
        margin: 0 auto 0 0;
    }
    .rp-company-brand .rp-comapny-contain .rp-company-logo .edit-pimage{
        opacity: 1;
    }
    .rp-card-header {
        flex-wrap: wrap;
    }

    .rp-header h1.rp-title {
        font-size: 16px;
    }

    .rp-company-brand .rp-comapny-contain {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .rp-company-brand .rp-comapny-contain .rp-company-logo img {
        max-width: 100px;
    }

    .rp-company-brand .rp-company-name {
        font-size: 16px;
    }

    .rp-company-brand .rp-comapny-contain {
        margin-bottom: 20px;
    }

    .reseller-products-section {
        padding: 0 0;
    }

    .rp-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .rp-actions {
        width: 100%;
        display: flex;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .rp-btn {
        width: fit-content;
        justify-content: center;
        padding: 6px 24px;
    }

    .rp-footer {
        flex-direction: column;
    }

    .rp-btn-lg {
        width: fit-content;
    }
}

/* Modal Styles */
.rp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.rp-modal-content {
    background: #fff;
    width: 100%;
    max-width: 1080px;
    margin: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    padding: 30px;
    animation: rpFadeIn 0.3s ease-out;
}

@keyframes rpFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rp-modal-header {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 25px;
}

.rp-modal-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin: 0 !important;
    color: #252525;
    margin-bottom: 25px !important;
}

form#company-details-form .rp-form-grid {
    padding: 20px;
    border: 1px solid #E0E6EB;
    border-radius: 10px;
}

.rp-modal-close {
    background: #0073aa;
    color: #fff;
    border: none;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.rp-modal-close:hover {
    background: #005a87;
}

/* Modal Form Grid */
.rp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.rp-form-group {
    display: flex;
    flex-direction: column;
}

.rp-form-group label {
    margin-bottom: 14px;
    font-family: Open Sans;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.2;
    color: #252525;
}

.rp-form-group .rp-form-control {
    border: 1px solid #0081CC;
    border-radius: 6px;
    padding: 18px 15px;
    font-size: 16px;
    color: #252525;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

.rp-form-group input[type="file"].rp-form-control {
    padding: 15px 15px;
    /* Adjust padding for file input text consistency */
}

.rp-form-group .rp-form-control:focus {
    border-color: #0073aa;
}

.rp-form-group select.rp-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}

/* Modal Footer */
.rp-modal-footer {
    border-top: none;
}

.rp-btn-submit {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.rp-btn-submit:hover {
    background-color: #005a87;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .rp-form-grid {
        grid-template-columns: 1fr;
    }

    .rp-modal-content {
        padding: 20px;
        margin: 0 auto;
        width: 100%;
    }
}
@media (max-width: 480px){
    .rp-logo-preview-wrapper{
        flex-direction: column;
    }
}