/* Frontend ShipStation Overwatch Styles */
.sso-frontend-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.sso-frontend-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
}

.sso-frontend-header h2 {
    color: #0073aa;
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.sso-frontend-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.sso-frontend-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sso-frontend-section h3 {
    color: #333;
    font-size: 20px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.sso-frontend-section h4 {
    color: #333;
    font-size: 16px;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.sso-frontend-section p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* Form Elements */
.sso-form-row {
    margin-bottom: 25px;
}

.sso-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.sso-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    margin-bottom: 10px;
}

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

.sso-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px 5px 5px 0;
}

.sso-button-primary {
    background: #0073aa;
    color: white;
}

.sso-button-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sso-button-secondary {
    background: #666;
    color: white;
}

.sso-button-secondary:hover {
    background: #555;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sso-description {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Messages */
.sso-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 14px;
}

.sso-message-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.sso-message-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.sso-message-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.sso-message-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Status */
.sso-status-connected {
    color: #28a745;
    font-weight: 600;
    font-size: 16px;
}

/* Stores */
.sso-stores-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.sso-store-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.sso-store-item:last-child {
    border-bottom: none;
}

/* Search Form */
.sso-search-form {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.sso-search-form .sso-input {
    flex: 1;
    min-width: 300px;
    margin-bottom: 0;
}

.sso-quick-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

/* Results Section */
.sso-results-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sso-results-section h3 {
    color: #333;
    font-size: 20px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

/* Order Cards */
.sso-order-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.sso-order-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.sso-order-number {
    font-weight: 700;
    color: #0073aa;
    font-size: 18px;
    margin-bottom: 10px;
}

.sso-customer-name {
    font-weight: 600;
    color: #333;
    margin: 8px 0;
}

.sso-order-date {
    color: #666;
    margin: 8px 0;
}

.sso-order-status {
    margin: 8px 0;
    font-weight: 500;
}

.sso-edit-order {
    margin-top: 15px;
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.sso-edit-order:hover {
    background: #218838;
}

/* Modal Styles (same as admin but with frontend prefix) */
.sso-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.sso-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: ssoModalSlideIn 0.3s ease-out;
}

@keyframes ssoModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sso-modal-header {
    background: #0073aa;
    color: white;
    padding: 20px;
    border-bottom: none;
    position: relative;
}

.sso-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.sso-modal-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sso-modal-close:hover {
    opacity: 1;
}

.sso-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.sso-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
    text-align: right;
}

.sso-modal-footer .sso-button {
    margin-left: 10px;
}

/* Loading States */
.sso-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.sso-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: ssoSpin 1s linear infinite;
    margin-right: 10px;
}

.sso-button-light {
    background: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
}

.sso-button-light:hover {
    background: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Stores Modal Styles */
.sso-user-stores-display {
    padding: 10px 0;
}

.sso-stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.sso-store-display-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    text-align: center;
}

.sso-store-name {
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 5px;
}

.sso-store-id {
    font-size: 12px;
    color: #666;
}

.sso-stores-note {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .sso-stores-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes ssoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sso-frontend-container {
        padding: 15px;
    }
    
    .sso-frontend-section {
        padding: 20px;
    }
    
    .sso-search-form {
        flex-direction: column;
    }
    
    .sso-search-form .sso-input {
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    .sso-modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .sso-modal-footer {
        text-align: center;
    }
    
    .sso-modal-footer .sso-button {
        margin: 5px;
        display: inline-block;
        min-width: 100px;
    }
}

/* Tracking Information Styles */
.sso-tracking-section {
    margin: 15px 0 10px 0;
    padding: 12px;
    background: #f0f8ff;
    border: 1px solid #b8d4f0;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.sso-tracking-label {
    color: #0073aa;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.sso-tracking-item {
    margin: 6px 0;
    line-height: 1.4;
}

.sso-tracking-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    padding: 2px 6px;
    background: rgba(0, 115, 170, 0.1);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.sso-tracking-link:hover {
    background: #0073aa;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sso-carrier-name {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-left: 8px;
}

.sso-ship-date {
    color: #555;
    font-size: 13px;
    margin-left: 8px;
}

/* Enhanced order container for tracking display */
.sso-order-container.has-tracking {
    border-left: 4px solid #28a745;
}

.sso-order-container.has-tracking .sso-order-status {
    color: #28a745;
    font-weight: 600;
}

/* Responsive tracking styles */
@media (max-width: 768px) {
    .sso-tracking-section {
        padding: 10px;
        margin: 10px 0;
    }
    
    .sso-tracking-link {
        display: inline-block;
        margin: 2px 0;
        font-size: 12px;
    }
    
    .sso-carrier-name,
    .sso-ship-date {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        font-size: 12px;
    }
}

#sso-frontend-edit-order-status{
	height:50px;
}

/* Loading state for tracking */
.sso-tracking-loading {
    color: #666;
    font-style: italic;
    padding: 8px 0;
}

/* Multiple tracking numbers styling */
.sso-tracking-item + .sso-tracking-item {
    border-top: 1px solid rgba(0, 115, 170, 0.2);
    padding-top: 6px;
    margin-top: 6px;
}

/* Tracking icon (optional - you can add an icon if desired) */
.sso-tracking-label::before {
    content: "📦 ";
    margin-right: 4px;
}