/**
 * UPS Prepaid Label Frontend Styles
 */

/* Form Wrapper */
.ups-prepaid-label-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Sections */
.ups-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.ups-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #0071a1;
    padding-bottom: 10px;
}

/* Form Rows */
.ups-form-row {
    margin-bottom: 15px;
}

.ups-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ups-form-row input[type="text"],
.ups-form-row input[type="email"],
.ups-form-row input[type="tel"],
.ups-form-row input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.ups-form-row input:focus {
    outline: none;
    border-color: #0071a1;
    box-shadow: none;
}

.ups-form-row .required {
    color: #c00;
}

/* Form Row Variants */
.ups-form-row-halves {
    display: flex;
    gap: 15px;
}

.ups-form-row-halves .ups-form-col {
    flex: 1;
}

.ups-form-row-quarters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .ups-form-row-halves,
    .ups-form-row-quarters {
        display: block;
    }
    
    .ups-form-row-halves .ups-form-col,
    .ups-form-row-quarters .ups-form-col {
        margin-bottom: 15px;
    }
}

/* Form Actions */
.ups-form-actions {
    text-align: center;
    margin: 30px 0;
}

.ups-get-rates-btn {
    padding: 12px 40px !important;
    font-size: 16px !important;
    background: #000000 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0px !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
}

.ups-get-rates-btn:hover {
    background: #000000 !important;
}

.ups-get-rates-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
}

/* Rates Container */
.ups-rates-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.ups-rates-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.ups-rates-list {
    display: grid;
    gap: 15px;
}

/* Rate Item */
.ups-rate-item {
    padding: 15px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ups-rate-item:hover {
    border-color: #000000;
    box-shadow: none;
}

.ups-rate-item.selected {
    border-color: #aea494;
    background: #aea494;
}

.ups-rate-item-info {
    flex: 1;
}

.ups-rate-item-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.ups-rate-item-code {
    font-size: 12px;
    color: #666;
}

.ups-rate-item-price {
    font-size: 20px;
    font-weight: 700;
    color: #aea494;
}

.ups-rate-item-currency {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
}

.ups-rate-item-select {
    padding: 8px 20px;
    background: #aea494;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-left: 15px;
}

.ups-rate-item-select:hover {
    background: #aea494;
}

/* Messages */
.ups-form-messages {
    margin-top: 20px;
}

.ups-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.ups-message.error {
    background: #ffffff;
    border: 1px solid #000000;
    color: #991b1b;
}

.ups-message.success {
    background: #ffffff;
    border: 1px solid #000000;
    color: #166534;
}

.ups-message.info {
    background: #ffffff;
    border: 1px solid #000000;
    color: #1e40af;
}

/* Loading State */
.ups-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: ups-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes ups-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Thank You Page Styles */
.ups-prepaid-label-thank-you {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.ups-prepaid-label-thank-you h2 {
    margin-top: 0;
    color: #000000;
}

.ups-prepaid-label-thank-you p {
    margin: 10px 0;
}

.ups-prepaid-label-thank-you .button {
    margin-top: 15px;
}

/* Admin Order Meta Styles */
.ups-prepaid-label-order-meta h3 {
    margin-top: 0;
    color: #000000;
}

.ups-prepaid-label-order-meta p {
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 600px) {
    .ups-prepaid-label-form-wrapper {
        padding: 10px;
    }
    
    .ups-form-section {
        padding: 15px;
    }
    
    .ups-rate-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ups-rate-item-select {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}
