/**
 * Shipco Calculator Main Styles
 */

/* Main Calculator Container */
.shipco-calculator {
    max-width: 450px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.shipco-header {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: left;
    margin-bottom: 24px;
}

.shipco-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.shipco-header p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.shipco-header a {
    color: #0066cc;
    text-decoration: none;
}

/* Form */
.shipco-multi-step-form {
    padding: 0;
}

.shipco-form-step {
    display: none;
    padding: 20px;
}

.shipco-form-step.active {
    display: block;
}

.shipco-form-group {
    margin-bottom: 16px;
}

.shipco-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.shipco-form-group input[type="text"],
.shipco-form-group input[type="email"],
.shipco-form-group input[type="tel"],
.shipco-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
}

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

.shipco-form-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Radio Buttons */
.shipco-radio-group {
    display: flex;
    gap: 16px;
}

.shipco-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.shipco-radio input[type="radio"] {
    margin: 0;
    margin-right: 8px;
}

.shipco-radio span {
    font-size: 14px;
    color: #333;
}

/* Navigation Buttons */
.shipco-form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.shipco-prev-btn,
.shipco-next-btn,
.shipco-calculate-btn,
.shipco-submit-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.shipco-prev-btn {
    background-color: #f5f5f5;
    color: #555;
}

.shipco-next-btn,
.shipco-calculate-btn,
.shipco-submit-btn {
    background-color: #f17c67;
    color: white;
}

.shipco-prev-btn:hover {
    background-color: #e8e8e8;
}

.shipco-next-btn:hover,
.shipco-calculate-btn:hover,
.shipco-submit-btn:hover {
    background-color: #e57060;
}

/* When only one button (next) */
.shipco-form-step[data-step="1"] .shipco-form-nav {
    justify-content: flex-end;
}

/* Progress Indicator */
.shipco-progress {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.shipco-progress:before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.shipco-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.shipco-step-number,
.shipco-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid #ddd;
}

.shipco-progress-step.active .shipco-step-number {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.shipco-progress-step.completed .shipco-step-icon {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.shipco-progress-step span {
    font-size: 12px;
    color: #666;
}

/* Legal Text */
.shipco-legal {
    margin-top: 16px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.shipco-legal a {
    color: #0066cc;
    text-decoration: none;
}

/* Success and Error Messages */
.shipco-form-success,
.shipco-form-error {
    padding: 30px 20px;
    text-align: center;
}

.shipco-form-success h3,
.shipco-form-error h3 {
    margin-top: 0;
    font-size: 22px;
    color: #333;
}

.shipco-form-success p,
.shipco-form-error p {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
}

.shipco-quote-id {
    font-weight: bold;
    color: #2196F3;
}

/* Error styling */
.error {
    border-color: #f44336 !important;
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
}

/* Mini Calculator */
.shipco-mini-calculator {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    max-width: 400px;
    margin: 0 auto;
}

/* Loading state */
.shipco-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.shipco-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Distance and price estimation */
.shipco-distance-estimate {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.shipco-price-estimate {
    margin-top: 10px;
}