* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
}

/* Container for the entire layout */
.review-container {
    display: flex;
    min-height: 100vh;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* Left Column - Company and Prescriber Information */
.left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: visible;
    position: relative;
}

/* Right Column - Iframe */
.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Card styling */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 8px 24px rgba(0, 168, 179, 0.15);
    transform: translateY(-2px);
}

/* Card header styling */
.card-header {
    background: linear-gradient(135deg, #00a8b3, #008a94);
    color: white;
    /*padding: 20px 25px;*/
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00a8b3, #008a94, #00a8b3);
}

/* Card content styling */
.card-content {
    padding: 25px;
}

/* Form group styling for review display */
.review-group {
    display: flex;
    align-items: flex-start;
    /*margin-bottom: 18px;*/
    /*padding: 12px 0;*/
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.review-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.review-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
    padding-right: 15px;
}

.review-value {
    flex: 1;
    color: #333;
    font-size: 14px;
    word-break: break-word;
}

.review-value.empty {
    color: #999;
    font-style: italic;
}

/* Iframe container styling */
.iframe-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.iframe-header {
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    color: white;
    padding: 20px 25px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.iframe-content {
    flex: 1;
    padding: 0;
    position: relative;
}

.iframe-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #f8f9fa;
}

/* Empty state for iframe */
.iframe-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 16px;
    text-align: center;
    padding: 40px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00a8b3, #008a94);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #008a94, #006b73);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 179, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-save-flags {
    background: #007bff;
    color: white;
}

.btn-save-flags:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Flag system styling */
.flag-container {
    position: absolute;
    right: 0;
    top: 0;
    display: inline-block;
    overflow: visible;
    z-index: 10;
    vertical-align: top;
}

/* Ensure dropdown positioning works correctly */
.review-group {
    position: relative;
    z-index: 1;
}

.flag-button, .notes-button {
    /*background: #ffc107;*/
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.notes-button {
    background: #6c757d;
    color: white;
}

.notes-button:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.flag-button:hover {
    background: #e0a800;
    transform: scale(1.1);
}

.flag-button.flagged {
    background: #dc3545;
    color: white;
}

.flag-button.flagged:hover {
    background: #c82333;
}

.flagged-field {
    background-color: #f8d7da !important;
    border: 2px solid #dc3545 !important;
    border-radius: 5px;
    padding: 8px;
}

.flag-dropdown {
    position: absolute;
    top: 35px;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 300px;
    display: none;
    white-space: nowrap;
    transform: translateX(-50%);
}

.decline-reason-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.decline-reason-select:focus {
    outline: none;
    border-color: #00a8b3;
    box-shadow: 0 0 0 2px rgba(0, 168, 179, 0.2);
}

.flag-notes {
    position: absolute;
    top: 35px;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
    max-width: 300px;
    display: none;
}

.flag-notes textarea {
    width: 100%;
    height: 80px;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px;
    resize: vertical;
    font-size: 14px;
}

.flag-notes .flag-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.flag-notes .btn-save-note, .flag-notes .btn-cancel-note {
    padding: 5px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.flag-notes .btn-save-note {
    background: #28a745;
    color: white;
}

.flag-notes .btn-cancel-note {
    background: #6c757d;
    color: white;
}

.flag-indicator {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 5px;
}

/* Form input styling for editable fields */
.review-value .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.review-value .form-control:focus {
    outline: none;
    border-color: #00a8b3;
    box-shadow: 0 0 0 2px rgba(0, 168, 179, 0.2);
}

.review-value .form-control.flagged-field {
    border-color: #dc3545;
    background-color: #f8d7da;
}

/* Address fields styling */
.address-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.address-row {
    display: flex;
    gap: 8px;
}

.address-row .form-control {
    flex: 1;
}

.address-row .form-control:first-child {
    flex: 2; /* City gets more space */
}

.address-row .form-control:last-child {
    flex: 1; /* ZIP gets less space */
}

/* Responsive design */
@media (max-width: 1024px) {
    .review-container {
        flex-direction: column;
    }

    .left-column,
    .right-column {
        flex: none;
    }

    .iframe-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .review-container {
        padding: 10px;
        gap: 15px;
    }

    .review-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-label {
        flex: none;
        margin-bottom: 5px;
        font-weight: 700;
    }

    .review-value {
        flex: none;
        width: 100%;
    }

    .address-row {
        flex-direction: column;
    }

    .address-row .form-control {
        flex: none;
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00a8b3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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