/**
 * CMB SQLite Form - Base Styles
 * Minimalista, neutral styling for out-of-box appearance
 * Can be overridden by custom inline CSS via cascade
 */

/* Container */
.cmb-sf-wrap {
    background-color: white;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Form */
.cmb-sf-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Field containers */
.cmb-sf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Labels */
.cmb-sf-label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.cmb-sf-required {
    color: #dc2626;
    margin-left: 2px;
}

/* Inputs and textarea */
.cmb-sf-input,
.cmb-sf-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.cmb-sf-input:focus,
.cmb-sf-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cmb-sf-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Privacy checkbox */
.cmb-sf-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cmb-sf-privacy input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.cmb-sf-privacy label {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    cursor: pointer;
}

.cmb-sf-privacy a {
    color: #2563eb;
    text-decoration: underline;
}

.cmb-sf-privacy a:hover {
    color: #1d4ed8;
}

/* Submit button */
.cmb-sf-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    align-self: flex-start;
}

.cmb-sf-button:hover {
    background-color: #1d4ed8;
}

.cmb-sf-button:active {
    transform: scale(0.98);
}

.cmb-sf-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.cmb-sf-message {
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.cmb-sf-success {
    color: #065f46;
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
}

.cmb-sf-error {
    color: #991b1b;
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
}

/* Responsive design */
@media (max-width: 640px) {
    .cmb-sf-wrap {
        padding: 16px;
    }

    .cmb-sf-form {
        gap: 14px;
    }

    .cmb-sf-input,
    .cmb-sf-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .cmb-sf-button {
        width: 100%;
        align-self: stretch;
    }
}
