/* =============================================
   RTR Ride Log Form — Frontend Styles
   ============================================= */

.rtr-form-wrap {
    max-width: 580px;
    margin: 0 auto;
    font-family: inherit;
}

.rtr-form-header {
    margin-bottom: 24px;
}

.rtr-form-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #1a1a1a;
}

.rtr-form-subhead {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Fields */
.rtr-field {
    margin-bottom: 20px;
}

.rtr-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.rtr-required { color: #c62828; }
.rtr-optional { color: #999; font-weight: 400; font-size: 13px; }

.rtr-field input[type="text"],
.rtr-field input[type="number"],
.rtr-field input[type="date"],
.rtr-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rtr-field input:focus,
.rtr-field select:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.rtr-field-hint {
    margin: 5px 0 0;
    font-size: 12px;
    color: #888;
}

/* Miles input with unit */
.rtr-miles-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rtr-miles-input-wrap input {
    max-width: 140px;
}

.rtr-miles-unit {
    font-size: 14px;
    color: #666;
}

/* Radio group */
.rtr-radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rtr-radio-option {
    display: flex !important;
    align-items: center;
    gap: 0;
    font-weight: 400 !important;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.rtr-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
}

.rtr-radio-label {
    padding: 9px 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.rtr-radio-option input[type="radio"]:checked + .rtr-radio-label {
    border-color: #2e7d32;
    background: #f1f8f1;
    color: #2e7d32;
    font-weight: 600;
}

.rtr-radio-label:hover {
    border-color: #888;
}

/* File upload */
.rtr-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.rtr-upload-area:hover {
    border-color: #2e7d32;
    background: #f1f8f1;
}

.rtr-upload-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.rtr-upload-icon { font-size: 20px; }

.rtr-upload-preview {
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

.rtr-upload-remove {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    color: #c62828;
    margin-left: auto;
}

/* LNT box */
.rtr-lnt-box {
    background: #f1f8f1;
    border-left: 4px solid #2e7d32;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #444;
    margin-bottom: 20px;
}

.rtr-lnt-box a { color: #2e7d32; }

/* Checkbox */
.rtr-field-check label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    cursor: pointer;
}

.rtr-field-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: #2e7d32;
    cursor: pointer;
}

/* Error */
.rtr-form-error {
    background: #fce4e4;
    border-left: 4px solid #c62828;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #c62828;
    margin-bottom: 16px;
}

/* Submit */
.rtr-field-submit { margin-top: 8px; }

.rtr-btn-primary {
    display: inline-block;
    background: #2e7d32;
    color: #fff !important;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
}

.rtr-btn-primary:hover:not(:disabled) { background: #1b5e20; }
.rtr-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.rtr-btn-secondary {
    background: #fff;
    color: #2e7d32 !important;
    border: 1px solid #2e7d32;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Success */
.rtr-form-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f1f8f1;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 20px;
    flex-wrap: wrap;
}

.rtr-success-icon { font-size: 28px; flex-shrink: 0; }

.rtr-success-body { flex: 1; }

.rtr-form-success strong {
    display: block;
    font-size: 17px;
    color: #2e7d32;
    margin-bottom: 4px;
}

.rtr-form-success p {
    margin: 0 0 14px;
    font-size: 14px;
    color: #444;
}

.rtr-success-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.rtr-btn-dashboard {
    display: inline-block;
    width: auto !important;
    padding: 9px 18px !important;
    font-size: 14px !important;
}

/* Responsive */
@media ( max-width: 480px ) {
    .rtr-radio-group { flex-direction: column; }
    .rtr-radio-label { width: 100%; box-sizing: border-box; }
}

/* Locked activity display */
.rtr-activity-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    width: fit-content;
}

.rtr-activity-icon { font-size: 18px; }

.rtr-activity-lock-note {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}
