/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/**
 * Frontend styles for the Swappers plugin
 */

/* Form Containers */
.swappers-login-form,
.swappers-register-form,
.swappers-lost-password-form,
.swappers-dashboard {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Form Headers */
.swappers-login-form h2,
.swappers-register-form h2,
.swappers-lost-password-form h2,
.swappers-dashboard h2 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 24px;
    color: #333;
}

/* Form Rows */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="tel"],
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    transition: border-color 0.3s ease;
}

.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus,
.form-row input[type="password"]:focus,
.form-row input[type="tel"]:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.2);
}

/* Terms & Conditions Toggle */
.terms-row {
    margin-bottom: 25px;
}

.terms-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: normal;
    padding: 5px 0;
}

.terms-label span {
    flex: 1;
    line-height: 24px; /* Match the height of the toggle switch */
    margin-left: 0px;
}

.terms-label a {
    color: #0073aa;
    text-decoration: none;
    margin: 0 5px;
}

.terms-label a:hover {
    text-decoration: underline;
}

/* Remember Me Toggle */
.remember-row {
    margin-bottom: 25px;
}

.remember-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: normal;
    padding: 5px 0;
}

.remember-label span {
    flex: 1;
    line-height: 24px; /* Match the height of the toggle switch */
    margin-left: 0px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #117793;
}

input:focus + .slider {
    box-shadow: 0 0 1px #117793;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Form Links */
.form-links {
    margin-top: 20px;
    text-align: center;
}

.form-links a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #00a0d2;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background: #00a0d2;
}

.button-primary {
    background: #1aa88d;
}

.button-primary:hover {
    background: #00a0d2;
}

/* Messages */
.swappers-message {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.swappers-message.success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.swappers-message.error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

/* Dashboard Specific */
.profile-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.profile-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    color: #333;
}

.image-preview {
    margin-bottom: 10px;
}

.image-preview img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
}

.description {
    font-size: 0.8em;
  color: #666;
  margin-top: 5px;
  font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .swappers-login-form,
    .swappers-register-form,
    .swappers-lost-password-form,
    .swappers-dashboard {
        max-width: 100%;
        margin: 0;
        padding: 15px;
    }

    .form-row input[type="text"],
    .form-row input[type="email"],
    .form-row input[type="password"],
    .form-row input[type="tel"],
    .form-row textarea,
    .form-row select {
        font-size: 16px; /* Prevent zoom on mobile */
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .swappers-login-form,
    .swappers-register-form,
    .swappers-lost-password-form,
    .swappers-dashboard {
        padding: 15px;
    }
    
    .profile-section {
        padding: 15px;
    }
}

/* Dashboard Header */
.swappers-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.swappers-dashboard-logout .button {
    background-color: #dc3232;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.swappers-dashboard-logout .button:hover {
    background-color: #c92626;
    color: white;
}

/* Featured Image Preview */
.featured-image-preview {
    position: relative;
    display: inline-block;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.featured-image-preview img {
    max-width: 200px;
    max-height: 150px;
    width: auto;
    height: auto;
    display: block;
}

.remove-featured-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background: rgba(220, 50, 50, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.remove-featured-image:hover {
    background: rgba(220, 50, 50, 1);
}

/* Current Image Display */
.current-image {
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.current-image img {
    max-width: 150px;
    max-height: 100px;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.current-image p {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Walkthrough Section - Scoped to Dashboard */
.swappers-dashboard .walkthrough-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.swappers-dashboard .walkthrough-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px 15px;
    background: rgba(255, 255, 255, 0.1);
}

.swappers-dashboard .walkthrough-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.swappers-dashboard .walkthrough-header .dashicons {
    font-size: 24px;
    color: #ffd700;
}

.swappers-dashboard .dismiss-walkthrough {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.swappers-dashboard .dismiss-walkthrough:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.swappers-dashboard .dismiss-walkthrough .dashicons {
    font-size: 16px;
    color: white;
    line-height: 22px;
}

.swappers-dashboard .walkthrough-content {
    padding: 25px;
}

.swappers-dashboard .walkthrough-content > p {
    margin: 0 0 20px 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
}

.swappers-dashboard .walkthrough-steps {
    display: grid;
    gap: 20px;
}

.swappers-dashboard .step-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.swappers-dashboard .step-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.swappers-dashboard .step-number {
    background: #ffd700;
    color: #333;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.swappers-dashboard .step-content {
    flex: 1;
}

.swappers-dashboard .step-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.swappers-dashboard .step-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    color: white;
}

.swappers-dashboard .step-action {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.swappers-dashboard .step-action:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Beta Notice Styles - Scoped to Dashboard */
.swappers-dashboard .beta-notice {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.swappers-dashboard .beta-notice .dashicons {
    font-size: 24px;
    color: #ffd700;
    margin-top: 2px;
}

.swappers-dashboard .beta-notice-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.swappers-dashboard .beta-notice-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
    color: white;
}

/* Responsive Design for Walkthrough - Scoped to Dashboard */
@media (max-width: 768px) {
    .swappers-dashboard .walkthrough-header {
        padding: 15px 20px 10px;
    }
    
    .swappers-dashboard .walkthrough-content {
        padding: 0 20px 20px;
    }
    
    .swappers-dashboard .step-item {
        padding: 12px;
        gap: 12px;
    }
    
    .swappers-dashboard .step-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .swappers-dashboard .step-content h4 {
        font-size: 15px;
    }
    
    .swappers-dashboard .step-content p {
        font-size: 13px;
    }
    
    .swappers-dashboard .beta-notice {
        padding: 15px 20px;
    }
}

/* Walkthrough Styling */
.walkthrough-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.walkthrough-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.walkthrough-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.walkthrough-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dismiss-walkthrough {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 16px;
}

.dismiss-walkthrough:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.walkthrough-content {
    position: relative;
    z-index: 1;
}

.walkthrough-content p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.walkthrough-content p:last-of-type {
    margin-bottom: 25px;
}

.walkthrough-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 25px;
}

.step-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
}

.step-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.step-content h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.step-content p {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.step-action {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.step-action:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for walkthrough */
@media (max-width: 768px) {
    .walkthrough-notice {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .walkthrough-header h1 {
        font-size: 24px;
    }
    
    .walkthrough-steps {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .step-item {
        padding: 20px;
    }
    
    .step-content h4 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .walkthrough-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .walkthrough-header h1 {
        font-size: 22px;
    }
    
    .dismiss-walkthrough {
        align-self: flex-end;
    }
}

/* Orders and SureCart Styling */
.orders-view {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.orders-view h2 {
    margin-top: 0;
    margin-bottom: 25px;
}

/* SureCart Orders List Customization */
sc-orders-list {
    display: block;
    margin-top: 20px;
}

sc-orders-list .order-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

sc-orders-list .order-item:hover {
    background: #f0f0f0;
}

sc-orders-list .order-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

sc-orders-list .order-status.paid {
    background: #e8f5e9;
    color: #2e7d32;
}

sc-orders-list .order-status.processing {
    background: #e3f2fd;
    color: #1565c0;
}

sc-orders-list .order-status.payment_failed {
    background: #ffebee;
    color: #c62828;
}

sc-orders-list .order-status.canceled,
sc-orders-list .order-status.void {
    background: #f5f5f5;
    color: #616161;
}

/* Modal styling */
sc-modal {
    --sc-modal-background: #fff;
    --sc-modal-border-radius: 8px;
    --sc-modal-padding: 30px;
}

sc-modal::part(header) {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

sc-modal::part(body) {
    padding: 30px;
}

sc-modal::part(footer) {
    padding: 20px 30px;
    border-top: 1px solid #eee;
}

/* Order details styling */
sc-order {
    display: block;
}

sc-order .order-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

sc-order .order-items {
    margin-top: 20px;
}

sc-order .order-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

sc-order .order-total {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: right;
    font-weight: bold;
} 