/* Shared Forms and Buttons Styles */

/* Base Button Styles */
.btn-primary {
    background: var(--brand-accent-orange);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(232,119,46,0.08);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-accent-orange-light);
    color: #fff;
    box-shadow: 0 2px 4px rgba(232,119,46,0.15);
}

.btn-primary:disabled {
    background: #e3e3e3;
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #e3f0ff;
    color: #1a4fa3;
    border: 1px solid #b6d4fe;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(26,79,163,0.04);
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover:not(:disabled) {
    background: #cbe4ff;
    color: #174080;
    border-color: #90c2fa;
    box-shadow: 0 2px 4px rgba(26,79,163,0.08);
}

.btn-secondary:disabled {
    background: #e3f0ff;
    color: #b6d4fe;
    border-color: #b6d4fe;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-danger, .btn-delete {
    background-color: #d32f2f;
    color: white;
    border: 1px solid #d32f2f;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-danger:hover:not(:disabled), .btn-delete:hover:not(:disabled) {
    background-color: #b71c1c;
    border-color: #b71c1c;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.btn-danger:disabled, .btn-delete:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

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

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--input-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-accent-orange);
    box-shadow: 0 0 0 2px rgba(235, 129, 50, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-color-light);
    opacity: 0.7;
}

.form-group small {
    font-size: 12px;
    color: var(--text-color-light);
    margin-top: 4px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.form-group.error small {
    color: #dc3545;
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.form-group.success small {
    color: #28a745;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    align-items: center;
}

.form-actions.center {
    justify-content: center;
}

.form-actions.right {
    justify-content: flex-end;
}

.form-actions.left {
    justify-content: flex-start;
}

.form-actions.space-between {
    justify-content: space-between;
}

/* Input Variants */
.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.input-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1) !important;
}

.input-disabled {
    background-color: var(--bg-secondary) !important;
    color: var(--text-color-light) !important;
    cursor: not-allowed !important;
}

/* Custom File Input */
.file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-input-label {
    padding: 10px 16px;
    background: var(--brand-accent-orange);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.file-input-label:hover {
    background: var(--brand-accent-orange-light);
}

.file-input-display {
    flex: 1;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--input-text);
    font-size: 14px;
}

/* Checkbox and Radio Styles */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
    width: auto;
    margin: 0;
}

.checkbox-item label,
.radio-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Responsive Form Adjustments */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .form-actions.space-between {
        flex-direction: column;
    }
}

/* Dark Mode Adjustments (Manual Toggle Only) */
body.dark-mode .btn-primary {
    background: var(--brand-accent-orange, #F9C08D);
    color: var(--brand-primary-dark, #1c2b4c);
    box-shadow: 0 1px 2px rgba(232,119,46,0.15);
    font-weight: 600;
}

body.dark-mode .btn-primary:hover:not(:disabled) {
    background: var(--brand-accent-orange-dark, #E8A870);
    color: var(--brand-primary-dark, #1c2b4c);
}

body.dark-mode .btn-primary:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

body.dark-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

body.dark-mode .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .btn-secondary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: #666;
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

/* Form inputs - white background with dark text in dark mode */
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background-color: #ffffff;
    color: var(--brand-primary-dark, #1c2b4c);
    border-color: rgba(28, 43, 76, 0.2);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--brand-accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 192, 141, 0.2);
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #888888;
    opacity: 1;
}

    .form-group label {
        color: #ffffff;
    }

    .form-group small {
        color: #aaaaaa;
    }

    .file-input-label {
        background: var(--brand-accent-orange, #F9C08D);
        color: var(--brand-primary-dark, #1c2b4c);
    }

    .file-input-label:hover {
        background: var(--brand-accent-orange-dark, #E8A870);
    }

    .file-input-display {
        background-color: #ffffff;
        color: var(--brand-primary-dark, #1c2b4c);
        border-color: rgba(28, 43, 76, 0.2);
    }
}

body.dark-mode .btn-primary {
    background: var(--brand-accent-orange, #F9C08D);
    color: var(--brand-primary-dark, #1c2b4c);
    font-weight: 600;
}

body.dark-mode .btn-primary:hover:not(:disabled) {
    background: var(--brand-accent-orange-dark, #E8A870);
    color: var(--brand-primary-dark, #1c2b4c);
}

body.dark-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
} 