/**
 * A2P SMS Compliance - Frontend Styles
 */

/* Opt-In Form Container */
.a2p-sms-opt-in-container {
    max-width: 500px;
    margin: 0 auto;
}

/* Form Styles */
.a2p-sms-opt-in-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.a2p-form-row {
    margin-bottom: 20px;
}

.a2p-form-row:last-child {
    margin-bottom: 0;
}

.a2p-form-row-split {
    display: flex;
    gap: 15px;
}

.a2p-form-row-split .a2p-form-field {
    flex: 1;
}

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

.a2p-form-field label .required {
    color: #dc3232;
}

.a2p-form-field input[type="text"],
.a2p-form-field input[type="tel"],
.a2p-form-field input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.a2p-form-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Consent Checkbox */
.a2p-consent-row {
    margin-top: 25px;
}

.a2p-checkbox-field {
    position: relative;
}

.a2p-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
}

.a2p-consent-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.a2p-consent-text {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.a2p-consent-text a {
    color: #0073aa;
    text-decoration: underline;
}

.a2p-consent-text a:hover {
    color: #005177;
}

.a2p-consent-text strong {
    font-weight: 600;
}

/* Submit Button */
.a2p-submit-row {
    margin-top: 25px;
}

.a2p-submit-btn {
    width: 100%;
    padding: 15px 25px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.a2p-submit-btn:hover {
    background: #005177;
}

.a2p-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.a2p-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.a2p-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: a2p-spin 0.8s linear infinite;
}

@keyframes a2p-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.a2p-form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.a2p-message-error {
    background: #fbeaea;
    color: #dc3232;
    border: 1px solid #f5c6c6;
}

.a2p-message-success {
    background: #e6f6e6;
    color: #46b450;
    border: 1px solid #c6e6c6;
}

/* Success Message */
.a2p-success-message {
    text-align: center;
    padding: 40px 30px;
    background: #e6f6e6;
    border-radius: 8px;
    border: 1px solid #c6e6c6;
}

.a2p-success-icon {
    width: 60px;
    height: 60px;
    background: #46b450;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

.a2p-success-message p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* Consent Checkbox (Standalone) */
.a2p-sms-consent-checkbox-container {
    margin: 15px 0;
}

.a2p-sms-consent-checkbox-container .a2p-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.a2p-sms-consent-checkbox-container .a2p-consent-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.a2p-sms-consent-checkbox-container .a2p-consent-text {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

/* Disclosures */
.a2p-sms-disclosures {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.a2p-disclosure-item {
    margin-bottom: 10px;
}

.a2p-disclosure-item:last-child {
    margin-bottom: 0;
}

.a2p-disclosure-item strong {
    color: #333;
}

.a2p-disclosure-links {
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: 15px;
}

.a2p-disclosure-links a {
    color: #0073aa;
    text-decoration: none;
}

.a2p-disclosure-links a:hover {
    text-decoration: underline;
}

.a2p-disclosure-carrier {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

/* WooCommerce Checkout Integration */
.a2p-sms-checkout-consent {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.a2p-sms-checkout-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.a2p-sms-checkout-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .a2p-sms-opt-in-form {
        padding: 20px;
    }
    
    .a2p-form-row-split {
        flex-direction: column;
        gap: 0;
    }
    
    .a2p-form-row-split .a2p-form-field {
        margin-bottom: 20px;
    }
    
    .a2p-form-row-split .a2p-form-field:last-child {
        margin-bottom: 0;
    }
    
    .a2p-consent-text {
        font-size: 12px;
    }
}
