/**
 * GathRound RFP – Frontend Styles
 * Submission form, user dashboard, notices
 */

/* ═══════════════════════════════════════════════════════════════
   VARIABLES & RESET
   ═══════════════════════════════════════════════════════════════ */
:root {
    --grfp-primary: #4a90d9;
    --grfp-primary-dark: #357abd;
    --grfp-success: #4caf50;
    --grfp-warning: #ff9800;
    --grfp-danger: #f44336;
    --grfp-info: #2196f3;
    --grfp-text: #333;
    --grfp-text-light: #666;
    --grfp-border: #ddd;
    --grfp-bg: #fafafa;
    --grfp-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   FORM WRAPPER
   ═══════════════════════════════════════════════════════════════ */
.grfp-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.grfp-instructions {
    background: #e3f2fd;
    border-left: 4px solid var(--grfp-info);
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: var(--grfp-radius);
    font-size: 14px;
    line-height: 1.6;
    color: var(--grfp-text);
}
.grfp-instructions p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   FORM FIELDS
   ═══════════════════════════════════════════════════════════════ */
.grfp-field-group {
    margin-bottom: 18px;
}

.grfp-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--grfp-text);
}
.grfp-label .required { color: var(--grfp-danger); }

.grfp-private-tag {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.grfp-input,
.grfp-textarea,
.grfp-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--grfp-border);
    border-radius: var(--grfp-radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--grfp-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.grfp-input:focus,
.grfp-textarea:focus,
.grfp-form select:focus {
    border-color: var(--grfp-primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
    outline: none;
}

.grfp-textarea { resize: vertical; }

/* Field rows for multi-column */
.grfp-field-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.grfp-field-half { flex: 1 1 45%; min-width: 200px; }
.grfp-field-third { flex: 1 1 30%; min-width: 160px; }

.grfp-event-name {
    font-size: 16px;
    margin: 0;
}
.grfp-event-dates {
    font-size: 13px;
    color: var(--grfp-text-light);
}

.grfp-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 30px 0;
}

/* ═══════════════════════════════════════════════════════════════
   SPEAKERS SECTION
   ═══════════════════════════════════════════════════════════════ */
.grfp-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--grfp-text);
    margin: 0 0 6px;
}
.grfp-section-desc {
    font-size: 13px;
    color: var(--grfp-text-light);
    margin: 0 0 20px;
}

.grfp-speaker-block {
    border: 1px solid var(--grfp-border);
    border-radius: var(--grfp-radius);
    padding: 20px;
    margin-bottom: 15px;
    background: var(--grfp-bg);
    position: relative;
    transition: box-shadow 0.2s;
}
.grfp-speaker-block:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.grfp-speaker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.grfp-speaker-number {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--grfp-primary-dark);
}

.grfp-btn-remove-speaker {
    background: transparent;
    border: 1px solid #ddd;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.grfp-btn-remove-speaker:hover {
    background: var(--grfp-danger);
    color: #fff;
    border-color: var(--grfp-danger);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.grfp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--grfp-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.grfp-btn-primary {
    background: var(--grfp-primary);
    color: #fff;
}
.grfp-btn-primary:hover {
    background: var(--grfp-primary-dark);
}
.grfp-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.grfp-btn-secondary {
    background: #fff;
    color: var(--grfp-primary);
    border: 1px solid var(--grfp-primary);
}
.grfp-btn-secondary:hover {
    background: #f0f7ff;
}

.grfp-btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

.grfp-btn-withdraw {
    background: #fff;
    color: var(--grfp-danger);
    border: 1px solid var(--grfp-danger);
}
.grfp-btn-withdraw:hover {
    background: #fff5f5;
}

.grfp-submit-area {
    text-align: center;
    padding: 10px 0;
}

/* ═══════════════════════════════════════════════════════════════
   NOTICES / MESSAGES
   ═══════════════════════════════════════════════════════════════ */
.grfp-notice {
    padding: 15px 20px;
    border-radius: var(--grfp-radius);
    margin-bottom: 20px;
    font-size: 14px;
}
.grfp-notice p { margin: 0; }
.grfp-notice a { font-weight: 600; }

.grfp-notice-info {
    background: #e3f2fd;
    border-left: 4px solid var(--grfp-info);
    color: #0d47a1;
}
.grfp-notice-warning {
    background: #fff3e0;
    border-left: 4px solid var(--grfp-warning);
    color: #e65100;
}

.grfp-message {
    padding: 15px 20px;
    border-radius: var(--grfp-radius);
    margin-bottom: 20px;
    font-size: 14px;
}
.grfp-message-success {
    background: #e8f5e9;
    border-left: 4px solid var(--grfp-success);
    color: #2e7d32;
}
.grfp-message-error {
    background: #ffebee;
    border-left: 4px solid var(--grfp-danger);
    color: #c62828;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — MY PROPOSALS
   ═══════════════════════════════════════════════════════════════ */
.grfp-dashboard {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.grfp-dashboard-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--grfp-text);
}

.grfp-proposal-card {
    border: 1px solid var(--grfp-border);
    border-radius: var(--grfp-radius);
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.grfp-proposal-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.grfp-proposal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.grfp-proposal-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--grfp-text);
}

.grfp-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.grfp-status-pending  { background: #fff3e0; color: #e65100; }
.grfp-status-review   { background: #e3f2fd; color: #1565c0; }
.grfp-status-accepted { background: #e8f5e9; color: #2e7d32; }
.grfp-status-rejected { background: #fce4ec; color: #c62828; }

.grfp-proposal-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: var(--grfp-text-light);
    margin-bottom: 10px;
}

.grfp-proposal-card-desc {
    font-size: 14px;
    color: var(--grfp-text-light);
    line-height: 1.5;
}

.grfp-accepted-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 15px;
    background: #e8f5e9;
    border-radius: var(--grfp-radius);
    font-size: 13px;
    color: #2e7d32;
    font-weight: 500;
}
.grfp-accepted-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.grfp-proposal-card-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* ═══════════════════════════════════════════════════════════════
   EDIT OVERLAY / PANEL
   ═══════════════════════════════════════════════════════════════ */
.grfp-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}
.grfp-edit-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    max-width: 720px;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 0;
}
.grfp-edit-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}
.grfp-edit-panel-header h3 {
    margin: 0;
    font-size: 20px;
}
.grfp-edit-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
}
.grfp-edit-close:hover {
    color: #c0392b;
}
.grfp-edit-panel .grfp-form {
    padding: 24px 28px 28px;
}
.grfp-edit-panel .grfp-submit-area {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.grfp-btn-edit {
    background: #2271b1 !important;
    color: #fff !important;
}
.grfp-btn-edit:hover {
    background: #135e96 !important;
}

/* ═══════════════════════════════════════════════════════════════
   CEU (CONTINUING EDUCATION) SECTION
   ═══════════════════════════════════════════════════════════════ */
.grfp-ceu-section {
    position: relative;
}
.grfp-ceu-section .grfp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.grfp-ceu-fields {
    border: 1px solid #e1bee7;
    border-radius: var(--grfp-radius);
    padding: 20px;
    margin-top: 12px;
    background: #faf5fc;
}

/* ═══════════════════════════════════════════════════════════════
   PHOTO UPLOAD
   ═══════════════════════════════════════════════════════════════ */
.grfp-field-hint {
    font-size: 13px;
    color: #666;
    margin: 2px 0 8px;
    line-height: 1.4;
}
.grfp-photo-upload-area {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.grfp-photo-input {
    font-size: 14px;
}
.grfp-photo-preview {
    position: relative;
    display: inline-block;
}
.grfp-photo-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}
.grfp-btn-remove-photo {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}
.grfp-btn-remove-photo:hover {
    background: #e74c3c;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .grfp-field-row {
        flex-direction: column;
        gap: 0;
    }
    .grfp-field-half,
    .grfp-field-third {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .grfp-proposal-card-header {
        flex-direction: column;
    }
    .grfp-proposal-card-meta {
        flex-direction: column;
        gap: 6px;
    }
}
