/* ROI Custom Image Modal Styles */
.roi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.roi-modal-overlay.active {
    display: flex;
}

.roi-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.roi-modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 24px 32px 0;
    border-bottom: none;
}

.roi-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.roi-close-btn:hover {
    color: #374151;
}

.roi-modal-content {
    padding: 32px;
}

.roi-modal-content h2 {
    margin: 0 0 32px 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.roi-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.roi-form-group {
    margin-bottom: 16px;
}

.roi-form-group input,
.roi-form-group select,
.roi-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: white;
}

.roi-form-group input:focus,
.roi-form-group select:focus,
.roi-form-group textarea:focus {
    outline: none;
    border-color: #7C3AED;
}

.roi-form-group input::placeholder,
.roi-form-group textarea::placeholder {
    color: #9CA3AF;
}

.roi-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.roi-select-wrapper {
    position: relative;
}

.roi-message-select {
    position: relative;
}

.roi-message-select .roi-select-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #DC2626;
    z-index: 1;
    pointer-events: none;
}

.roi-message-select select {
    padding-left: 48px !important;
    color: #DC2626 !important;
    font-weight: 500 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23DC2626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

.roi-message-select select option {
    color: #111827 !important;
    font-weight: normal !important;
    padding-left: 12px;
}

.roi-message-select select option:first-child {
    color: #DC2626 !important;
    font-weight: 500 !important;
}

.roi-form-group select option {
    color: #111827;
}

.roi-image-upload-section {
    margin: 24px 0;
}

.roi-file-input-wrapper {
    position: relative;
}

.roi-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 60px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #F3F4F6;
    min-height: 160px;
    position: relative;
}

.roi-file-label:hover {
    border-color: #D1D5DB;
    background: #F9FAFB;
}

.roi-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.roi-upload-icon {
    font-size: 48px;
    opacity: 0.6;
    color: #9CA3AF;
}

.roi-file-label span:last-child {
    color: #9CA3AF;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

.roi-image-preview {
    margin-top: 16px;
    text-align: center;
}

.roi-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.roi-file-input-wrapper.has-image .roi-file-label {
    border-color: #7C3AED;
    background: #F5F3FF;
    padding: 16px 24px;
    min-height: auto;
}

.roi-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 16px;
}

.roi-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.roi-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.roi-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.roi-success-content {
    text-align: center;
    padding: 48px 32px;
}

.roi-success-content.active {
    display: block !important;
}

.roi-success-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.roi-success-content h2 {
    color: #111827;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.roi-success-content > p {
    color: #6B7280;
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.5;
}

.roi-success-info {
    text-align: left;
    background: #F9FAFB;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    list-style: none;
}

.roi-success-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.roi-success-info li:last-child {
    margin-bottom: 0;
}

.roi-process-btn {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: default;
    margin: 24px 0;
}

.roi-confirmation-text {
    color: #6B7280 !important;
    font-size: 14px !important;
    margin: 16px 0 0 0 !important;
}

.roi-trigger-button {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.roi-trigger-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

@media (max-width: 768px) {
    .roi-modal {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }

    .roi-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .roi-modal-content {
        padding: 24px;
    }

    .roi-modal-header {
        padding: 16px 24px 0;
    }

    .roi-progress {
        gap: 8px;
    }

    .roi-step {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .roi-step-line {
        width: 16px;
    }

    .roi-success-content {
        padding: 32px 24px;
    }
}