/**
 * TextMe SMS Stock Notify Frontend Styles
 * 
 * @package TextMe\Features
 * @since 2.0.0
 */

.textme-stock-notify-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 20px auto;
    padding: 30px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.textme-stock-alert-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
}

.textme-stock-notify-form {
    width: 100%;
}

.textme-stock-notify-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.textme-input-group {
    width: 100%;
}

.textme-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

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

.textme-form-input::placeholder {
    color: #999;
}

.textme-button-group {
    width: 100%;
}

.textme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
}

.textme-btn-primary {
    background: #0073aa;
    color: #fff;
    width: 100%;
}

.textme-btn-primary:hover:not(:disabled) {
    background: #005a87;
    color: #fff;
}

.textme-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.textme-btn-spinner {
    display: none;
}

.textme-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: textme-spin 1s linear infinite;
}

@keyframes textme-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.textme-stock-notify-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

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

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

/* Responsive design */
@media (max-width: 480px) {
    .textme-stock-notify-wrapper {
        margin: 10px;
        padding: 20px 15px;
        max-width: none;
    }
    
    .textme-stock-alert-title {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .textme-form-input {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .textme-btn {
        padding: 10px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
    }
}

/* Integration with WooCommerce themes */
.woocommerce .textme-stock-notify-wrapper {
    margin: 20px 0;
}

.single-product .textme-stock-notify-wrapper {
    max-width: 100%;
    margin: 20px 0;
}

/* Theme compatibility */
.textme-stock-notify-wrapper * {
    box-sizing: border-box;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .textme-stock-notify-wrapper {
        border: 2px solid #000;
    }
    
    .textme-form-input {
        border: 2px solid #000;
    }
    
    .textme-btn-primary {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .textme-btn,
    .textme-form-input,
    .textme-spinner {
        transition: none;
        animation: none;
    }
}
