/* WineShipping Ship Date Scheduler Styles */

/* Checkout Date Field */
.ws-ship-date-field {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.ws-ship-date-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.ws-ship-date-field input[type="date"] {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
    transition: border-color 0.2s;
}

.ws-ship-date-field input[type="date"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.ws-ship-date-field small {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Order Received Page */
.ws-manage-order {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
}

.ws-manage-order p {
    margin-bottom: 15px;
    font-size: 16px;
}

.ws-manage-order .button {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    font-size: 16px;
}

.ws-manage-order .button:hover {
    background: #005a87;
}

/* My Account Schedule Shipping Page */
.ws-schedule-container {
    max-width: 800px;
}

.ws-order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.ws-order-summary h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.ws-order-summary p {
    margin: 8px 0;
}

.ws-order-summary code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

.ws-error-notice {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.ws-error-notice p {
    margin: 0 0 5px 0;
}

.ws-error-notice small {
    font-size: 12px;
    opacity: 0.8;
}

/* Schedule Form */
.ws-schedule-form {
    background: white;
    padding: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 25px;
}

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

.ws-schedule-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ws-schedule-form .required {
    color: #dc3545;
}

.ws-schedule-form input[type="date"] {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.ws-schedule-form input[type="date"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.ws-schedule-form .description {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.current-date {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.current-date small {
    color: #666;
    font-style: italic;
}

.form-actions {
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
    margin-top: 25px;
}

.button-primary {
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.button-primary:hover {
    background: #005a87;
}

.button-secondary {
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 10px;
    display: inline-block;
    transition: background 0.2s;
}

.button-secondary:hover {
    background: #e8e8e8;
}

/* Help Info */
.ws-help-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 20px;
    border-radius: 6px;
}

.ws-help-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #856404;
}

.ws-help-info ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.ws-help-info li {
    margin-bottom: 5px;
    color: #856404;
}

/* My Account Orders Actions */
.woocommerce-orders-table__cell-order-actions .button.ws_schedule {
    margin: 2px 0;
    background: #0073aa;
    color: white;
    font-size: 12px;
}

.woocommerce-orders-table__cell-order-actions .button.ws_schedule:hover {
    background: #005a87;
}

/* Admin Metabox Enhancements */
.ws-metabox-content {
    font-size: 13px;
}

.ws-metabox-content p {
    margin: 12px 0;
}

.ws-metabox-content strong {
    color: #23282d;
    display: block;
    margin-bottom: 4px;
}

.ws-metabox-content em {
    color: #666;
    font-size: 12px;
}

.ws-metabox-content .notice {
    margin: 15px 0;
    padding: 10px 12px;
    font-size: 12px;
}

.ws-metabox-content hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #e1e1e1;
}

.ws-metabox-content .button {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

/* WS Status Badges */
.ws-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ws-status-queued {
    background: #ffeaa7;
    color: #856404;
}

.ws-status-processing {
    background: #bee5eb;
    color: #0c5460;
    animation: ws-pulse 2s ease-in-out infinite;
}

.ws-status-scheduled {
    background: #d4edda;
    color: #155724;
}

.ws-status-error {
    background: #f8d7da;
    color: #721c24;
}

.ws-status-deferred {
    background: #e2e3e5;
    color: #383d41;
}

.ws-status-pending {
    background: #e6f3ff;
    color: #0c5460;
}

@keyframes ws-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Success/Error Messages */
.ws-success-message,
.woocommerce-message {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 4px;
    margin: 15px 0;
}

.ws-error-message,
.woocommerce-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    margin: 15px 0;
}

/* Loading States */
.ws-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ws-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: ws-spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ws-ship-date-field input[type="date"],
    .ws-schedule-form input[type="date"] {
        max-width: 100%;
    }
    
    .ws-manage-order .button {
        width: 100%;
        max-width: 300px;
    }
    
    .form-actions .button {
        width: 100%;
        margin: 5px 0;
    }
    
    .form-actions .button-secondary {
        margin-left: 0;
    }
    
    .ws-schedule-container {
        padding: 0 10px;
    }
}