/**
 * Lolo - PeepSo Request Proposer
 * Styles
 */

/* ============================================
   PROPOSAL BUTTON
   ============================================ */

.lolo-proposal-button {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 10px;
    background-color: #F27507;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: rgba(242, 117, 7, 0.35) 0px 5px 21px;
}

.lolo-proposal-button:hover {
    background-color: #d96606;
    transform: translateY(-2px);
    box-shadow: rgba(242, 117, 7, 0.45) 0px 8px 25px;
}

.lolo-proposal-button .dashicons {
    vertical-align: middle;
    margin-right: 6px;
    font-size: 18px;
    line-height: 1;
}

/* Disabled state */
.lolo-proposal-button.disabled {
    background-color: rgba(242, 117, 7, 0.4);
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: not-allowed;
    box-shadow: none;
}

.lolo-proposal-button.disabled:hover {
    background-color: rgba(242, 117, 7, 0.4);
    transform: none;
    box-shadow: none;
}

/* ============================================
   MODAL
   ============================================ */

.lolo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lolo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.lolo-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.lolo-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lolo-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.lolo-modal-header .vendor-name {
    color: #F27507;
}

.lolo-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lolo-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Modal Body */
.lolo-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Loading State */
.lolo-requests-loading {
    text-align: center;
    padding: 40px 20px;
}

.lolo-requests-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F27507;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lolo-requests-loading p {
    color: #666;
    margin: 0;
}

/* Select Label */
.lolo-select-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Requests List */
.lolo-requests-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lolo-request-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    background-color: #f9f9f9;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lolo-request-item:hover {
    background-color: #fff8f0;
    border-color: #F27507;
}

.lolo-request-checkbox {
    margin: 0;
    margin-right: 12px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.lolo-request-checkbox:checked {
    accent-color: #F27507;
}

.lolo-request-item label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lolo-request-item .request-title {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.lolo-request-item .request-date {
    font-size: 13px;
    color: #999;
}

.lolo-request-item:has(.lolo-request-checkbox:checked) {
    background-color: #fff8f0;
    border-color: #F27507;
}

.lolo-request-item:has(.lolo-request-checkbox:checked) .request-title {
    color: #F27507;
}

/* Already Applied State */
.lolo-request-item.already-applied {
    background-color: #f5f5f5;
    border-color: #d5d5d5;
    opacity: 0.75;
    cursor: default;
}

.lolo-request-item.already-applied:hover {
    background-color: #f5f5f5;
    border-color: #d5d5d5;
}

.lolo-request-item.already-applied .request-title {
    color: #999;
}

.lolo-request-item.already-applied .request-date {
    color: #bbb;
}

.lolo-request-item.already-applied .lolo-request-checkbox {
    cursor: not-allowed;
    opacity: 0.5;
}

.lolo-request-item .already-applied-notice {
    display: block;
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 4px;
    line-height: 1.4;
}

.lolo-request-item .already-applied-notice a {
    color: #F27507;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.lolo-request-item .already-applied-notice a:hover {
    color: #d96606;
    border-bottom-color: #d96606;
}

/* Error State */
.lolo-requests-error {
    text-align: center;
    padding: 40px 20px;
}

.lolo-requests-error .error-message {
    color: #dc3232;
    font-size: 15px;
    margin: 0;
}

/* Modal Footer */
.lolo-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Buttons */
.lolo-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lolo-btn-cancel {
    background-color: #f5f5f5;
    color: #666;
}

.lolo-btn-cancel:hover {
    background-color: #e5e5e5;
    color: #333;
}

.lolo-btn-submit {
    background-color: #F27507;
    color: #ffffff;
    box-shadow: rgba(242, 117, 7, 0.25) 0px 4px 12px;
}

.lolo-btn-submit:hover:not([disabled]) {
    background-color: #d96606;
    box-shadow: rgba(242, 117, 7, 0.35) 0px 6px 16px;
}

.lolo-btn-submit[disabled] {
    background-color: rgba(242, 117, 7, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}

.lolo-btn-submit .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* SVG paper plane / send icon in submit button */
.lolo-btn-submit .submit-text .send-icon {
    width: 18px !important;
    height: 18px !important;
    stroke: #fff !important;
    vertical-align: middle !important;
    margin-left: 8px !important;
    display: inline-block !important;
    transform: rotate(45deg) !important;
}

/* Body lock when modal is open */
body.lolo-modal-open {
    overflow: hidden;
}

/* ============================================
   NOTIFICATION
   ============================================ */

.lolo-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.lolo-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.lolo-notification-success {
    background-color: #46b450;
    color: #ffffff;
}

.lolo-notification-error {
    background-color: #dc3232;
    color: #ffffff;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .lolo-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .lolo-proposal-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .lolo-modal-header {
        padding: 16px;
    }

    .lolo-modal-body {
        padding: 16px;
    }

    .lolo-modal-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
    }

    .lolo-btn {
        width: 100%;
        justify-content: center;
    }

    .lolo-notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}
