/* Google Calendar Frontend Styles */
.google-calendar-connect-container {
     margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.google-calendar-connect-container h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
 }

.google-calendar-status {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid;
}

.google-calendar-status.connected {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.google-calendar-status.not-connected {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.google-calendar-status p {
    margin: 0 0 10px 0;
}

.google-calendar-status p:last-child {
    margin-bottom: 0;
}

/* WooCommerce Order Sync Section */
.woo-orders-sync-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 5px;
}

.woo-orders-sync-section h4 {
    margin: 0 0 10px 0;
    color: #0056b3;
    font-size: 16px;
    font-weight: 600;
}

.woo-orders-sync-section p {
    margin: 0 0 15px 0;
    color: #0056b3;
    font-size: 14px;
    line-height: 1.4;
}

.order-sync-stats {
    margin: 15px 0;
    padding: 12px;
    background-color: #fff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
}

.order-sync-stats p {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.order-sync-stats ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.order-sync-stats li {
    margin-bottom: 5px;
    color: #555;
    font-size: 13px;
    position: relative;
}

.order-sync-stats li:before {
    content: "•";
    color: #0073aa;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.sync-user-orders {
    background-color: #28a745 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    margin-top: 10px !important;
}

.sync-user-orders:hover {
    background-color: #218838 !important;
}

.sync-user-orders:disabled {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
}

.test-calendar-sync {
    background-color: #17a2b8 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    margin-top: 10px !important;
}

.test-calendar-sync:hover {
    background-color: #138496 !important;
}

.test-calendar-sync:disabled {
    background-color: #6c757d !important;
    cursor: not-allowed !important;
}

.google-calendar-form {
    margin-top: 20px;
}

.google-calendar-form h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.google-calendar-form .description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.google-calendar-form .description a {
    color: #0073aa;
    text-decoration: none;
}

.google-calendar-form .description a:hover {
    text-decoration: underline;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-row input[type="text"],
.form-row input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row input[type="text"]:focus,
.form-row input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.form-row button {
   
}

.form-row button.button-primary {
    background-color: #0073aa;
    color: #fff;
}

.form-row button.button-primary:hover {
    background-color: #005a87;
}

.form-row button.button-secondary {
    background-color: #6c757d;
    color: #fff;
}

.form-row button.button-secondary:hover {
    background-color: #545b62;
}

.form-row button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.authorization-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.authorization-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.authorization-section .description {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.disconnect-calendar {
    background-color: #dc3545 !important;
    color: #fff !important;
    margin-top: 10px;
}

.disconnect-calendar:hover {
     color: #c82333!important;
}

#google-calendar-messages {
    margin-top: 20px;
}

.google-calendar-success,
.google-calendar-error,
.google-calendar-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

.google-calendar-success,
.google-calendar-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.google-calendar-error,
.google-calendar-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .google-calendar-connect-container {
        margin: 10px;
        padding: 15px;
    }
    
    .google-calendar-connect-container h3 {
        font-size: 20px;
    }
    
    .form-row button {
        width: 100%;
    }
    
    .woo-orders-sync-section {
        margin: 15px 0;
        padding: 12px;
    }
    
    .order-sync-stats {
        padding: 10px;
    }
    
    .sync-user-orders {
        width: 100% !important;
    }
    
    .test-calendar-sync {
        width: 100% !important;
    }
}

/* Loading states */
.google-calendar-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Redirect URI Section */
.redirect-uri-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
}

.redirect-uri-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.redirect-uri-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.redirect-uri-display code {
    flex: 1;
    padding: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    color: #495057;
}

.copy-redirect-uri {
    padding: 6px 12px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.copy-redirect-uri:hover {
    background-color: #005a87;
}

.redirect-uri-section .description ol {
    margin: 10px 0;
    padding-left: 20px;
}

.redirect-uri-section .description li {
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Animation for messages */
.google-calendar-success,
.google-calendar-error,
.google-calendar-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 