/* Base styles for all devices */
.tws-postcode-p {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 50px;
    font-weight: 400;
    vertical-align: middle;
    color: #5e5b5c;
    width: 80%;
}

.tws-input-group,
.tws-address-select-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
}

#tws-postcode-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 24px;
    height: 60px;
    width: 80%;
}

#tws-address-select {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 18px;
    min-width: 200px;
}

#tws-set-postcode-button,
#tws-change-location-button {
    padding: 10px 15px;
    background-color: #57D6E2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px;
    white-space: nowrap;
    height: 60px;
    width: 20%;
    box-sizing: border-box;
}

#tws-set-postcode-button:hover,
#tws-change-location-button:hover {
    background-color: #43B6C1;
    border: 3px solid #642566;
    color: #642566;
}

/* Tablet styles (768px - 1024px) */
@media (max-width: 1024px) {
    #tws-postcode-lookup-container {
        padding: 25px 40px;
    }
    
    .tws-postcode-p {
        font-size: 40px;
        margin-right: 20px;
    }
    
    #tws-postcode-input,
    #tws-set-postcode-button,
    #tws-change-location-button {
        font-size: 20px;
        height: 55px;
    }
}

/* Mobile styles (up to 767px) */
@media (max-width: 767px) {
    #tws-postcode-lookup-container {
        padding: 20px;
        min-height: 250px;
    }
    
    .tws-postcode-p {
        font-size: 30px;
        margin-right: 15px;
        display: block;
        margin-bottom: 15px;
    }
    
    #tws-postcode-input,
    #tws-set-postcode-button,
    #tws-change-location-button {
        font-size: 18px;
        height: 50px;
    }
    
    .tws-input-group,
    .tws-address-select-group {
        flex-direction: column;
        gap: 15px;
    }
    
    #tws-postcode-input,
    #tws-address-select,
    #tws-set-postcode-button,
    #tws-change-location-button {
        width: 100%;
    }
    
    #tws-change-location-button {
        margin-top: 10px;
    }
}

/* Very small mobile devices (up to 480px) */
@media (max-width: 480px) {
    .tws-postcode-p {
        font-size: 24px;
    }
    
    #tws-postcode-input,
    #tws-set-postcode-button,
    #tws-change-location-button {
        font-size: 16px;
        height: 45px;
    }
}

/* Keep all your existing message and loader styles */
.tws-error-message {
    color: #dc3545;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

.tws-success-message {
    color: #28a745;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

.tws-info-message {
    color: black;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

.tws-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6a0dad;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    margin-top: 10px;
    margin-left: -15px;
    z-index: 1000;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}