/**
 * Digitalised CRM - Public Forms Styles
 * 
 * New Brand Colors:
 * - Neon Green: #22FF22 (Primary)
 * - Bright Green: #33FF33 (Hover)
 * - Dark Green: #1ACC1A (Active)
 * - Black: #000000 (Text on Green)
 * 
 * @package Digitalised_CRM
 */

/* Form Container */
.digitalised-crm-form-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.digitalised-crm-form-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Title */
.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    text-align: center;
}

.form-subtitle {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Form Elements */
.digitalised-crm-form {
    margin-top: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a!important;  /* Dark color with!important to override website CSS */
    margin-bottom: 8px;
}

.form-group label.required {
    color: #e74c3c!important;  /* Keep red for required, but with!important */
}

/* Additional specificity for labels */
.digitalised-crm-form.form-group label,
.digitalised-crm-form-container.form-group label {
    color: #1a1a1a!important;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #2c3e50;
    background-color: #ffffff;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #22FF22;
    box-shadow: 0 0 0 3px rgba(34, 255, 34, 0.15);
}

.form-control:disabled {
    background-color: #ecf0f1;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* Form Messages */
.form-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Submit Button */
.form-submit {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    color: #000000;
    background-color: #22FF22;
    width: 100%;
}

.btn-primary:hover {
    background-color: #33FF33;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 255, 34, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

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

.btn-loading {
    display: none;
}

.btn.loading.btn-text {
    display: none;
}

.btn.loading.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner.path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Privacy Note */
.form-privacy-note {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
   .digitalised-crm-form-container {
        padding: 30px 20px;
    }
    
   .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
   .form-title {
        font-size: 24px;
    }
}