/**
 * Woot Admin Order Styles
 *
 * @since 2.2.1
 */

/* City Select */
.woot-city-select {
    width: 100% !important;
}

.order_data_column .select2-container {
    width: 100% !important;
}

/* Woot Shipping Metabox */
#woot-shipping-metabox .inside {
    padding: 0;
    margin: 0;
}

.woot-shipping-content {
    padding: 12px;
}

.woot-shipping-row {
    margin-bottom: 12px;
}

.woot-shipping-row:last-child {
    margin-bottom: 0;
}

.woot-shipping-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.woot-shipping-row select,
.woot-shipping-row input[type="text"] {
    width: 100%;
}

.woot-shipping-row .select2-container {
    width: 100% !important;
}

/* Services List (Radio Buttons) */
.woot-services-list {
    margin-bottom: 12px;
}

.woot-services-group {
    margin-bottom: 12px;
}

.woot-services-group:last-child {
    margin-bottom: 0;
}

.woot-services-group-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #646970;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.woot-service-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.woot-service-option:last-child {
    margin-bottom: 0;
}

.woot-service-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.woot-service-option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.woot-service-option input[type="radio"]:checked + .woot-service-name {
    font-weight: 600;
    color: #2271b1;
}

.woot-service-option:has(input:checked) {
    border-color: #2271b1;
    background: #f0f6fc;
    box-shadow: 0 0 0 1px #2271b1;
}

.woot-service-name {
    font-size: 13px;
    color: #1e1e1e;
    line-height: 1.3;
}

/* Price Row */
.woot-price-row {
    margin: 16px 0 12px 0;
}

/* Price Display */
.woot-price-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 4px;
    font-size: 14px;
}

.woot-price-label {
    color: #646970;
    font-weight: 500;
}

.woot-price-display.loading {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #646970;
    font-style: italic;
}

.woot-price-display .price {
    font-weight: 600;
    font-size: 16px;
    color: #2271b1;
}

.woot-price-display.free {
    background: #edfaef;
    border-color: #68de7c;
}

.woot-price-display.free .price {
    color: #00a32a;
}

.woot-price-display.error {
    background: #fcf0f1;
    border-color: #facfd2;
}

.woot-price-display.error .price {
    color: #d63638;
    font-size: 13px;
    font-weight: normal;
}

.woot-price-display.needs-location,
.woot-price-display.needs-address {
    background: #fcf9e8;
    border-color: #dba617;
}

.woot-price-display.needs-location .price,
.woot-price-display.needs-address .price {
    color: #996800;
    font-style: italic;
    font-weight: normal;
    font-size: 13px;
}

/* Location Section */
.woot-location-section {
    margin: 16px 0;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
}

.woot-location-section > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 13px;
}

.woot-location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    transition: all 0.15s ease;
}

.woot-location-btn:hover {
    background: #135e96;
}

.woot-location-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

.woot-location-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.woot-location-btn span {
    font-weight: 500;
}

/* Location Card */
.woot-location-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin: 12px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.woot-location-card-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
    border-radius: 4px;
    padding: 6px;
}

.woot-location-card-logo img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.woot-location-card-info {
    flex: 1;
    min-width: 0;
}

.woot-location-card-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e1e1e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.woot-location-card-address {
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

/* Add Shipping Button */
.woot-add-shipping-btn {
    margin-top: 16px;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Modal Styles */
.woot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100100;
    justify-content: center;
    align-items: center;
}

.woot-modal.woot-modal-open {
    display: flex;
}

.woot-modal-content {
    background: #fff;
    width: 90%;
    max-width: 1100px;
    height: 90%;
    max-height: 800px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.woot-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    background: #f6f7f7;
}

.woot-toolbar-title {
    font-size: 16px;
    font-weight: 600;
}

.woot-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.woot-modal-close:hover {
    background: #ddd;
}

.woot-modal-close svg {
    width: 24px;
    height: 24px;
}

.woot-modal-body {
    flex: 1;
    overflow: hidden;
}

.woot-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Notice */
.woot-no-address-notice {
    padding: 12px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #d63638;
}
